How do you access global variables in a macro?


I would like to access the length of a line. This value shows up in the status bar when the line is moved, so there must be a live variable for it. The variable name is obviously not “length”, or the code below would work.

newImage(“Untitled”, “RGB white”, 660, 510, 1);

is there a list of global variables that are live during a session, and how are they accessed within a macro?

Ron DeSpain


Have a look at the ImageJ macro API, e.g., getLine: