April 29, 20242 yr Hi, This example is from the AAO manual and I want to execute it from the script editor (not from a file). <Macro·Name=“strobelightmacro“>A:LIGHT·STROBE,·Bool</Macro> (@strobelightmacro)·1·==·if{·1·(>K:STROBES_TOGGLE)·} (A:LIGHT·STROBE,·Bool)·1·==·if{·1·(>K:STROBES_TOGGLE)·} The Red Led on the editor is on to indicate something is wrong. Question is, does the script editor supports macros? https://imgur.com/a/6icp5q3 Thanks.
April 29, 20242 yr Commercial Member Generally speaking, yes. Remember that macros are a global thing, once established, they are valid everywhere, not just in this script. I would suggest using a multi line script for this. And I am not entirely sure that it would work with the "Test" button, you may have to run it with the extra dialog. <Macro·Name=“strobelightmacro“>A:LIGHT·STROBE,·Bool</Macro>·\n (@strobelightmacro)·1·==·if{·1·(>K:STROBES_TOGGLE)·}·\n (A:LIGHT·STROBE,·Bool)·1·==·if{·1·(>K:STROBES_TOGGLE)·}·\n On a side note, to avoid typing too much, I usually prefer using registers. They have the added benefit that they can be updated too during processing. (A:LIGHT·STROBE,·Bool)·s0 l0·1·==·if{·1·(>K:STROBES_TOGGLE)·} l0·0·==·if{·...·} LORBY-SI
Archived
This topic is now archived and is closed to further replies.