Here’s a routine I’m writing to find the currently active layer, based on TVEyes’ older article:
[RoutineDef, GetActiveLayer,
[Loop, 16,
[VarSet, layer, [StrMerge, "Layer:Layer ", n+1]]
[VarSet, flags, [IGetFlags, layer]]
[If, (flags=10) || (flags=11),
[VarSet, result, layer]
[LoopExit]
]
, n]
, result]
I haven’t yet tried to run it; for one thing, I need to know the boolean or operator in ZScript (line 5), and can’t find it in the reference materials.
And while I’m asking questions, does anyone know if line 3 (concatenating a number to the end of a string with StrMerge) will work? If not, how should this be done.
Thanks,
Ken