- java.lang.Object
-
- ij.Macro
-
public class Macro extends Object
The class contains static methods that perform macro operations.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMACRO_CANCELED
-
Constructor Summary
Constructors Constructor Description Macro()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidabort()Aborts the currently running macro or any plugin using IJ.run().static Stringeval(String code)Evaluates 'code' and returns the output, or any error, as a String (e.g., Macro.eval("2+2") returns "4").static StringgetDir(String path)static StringgetName(String path)static StringgetOptions()If a command started using run(name, options) is running, and the current thread is the same thread, returns the options string, otherwise, returns null.static StringgetValue(String options, String key, String defaultValue)static booleanopen(String path)static booleansaveAs(String path)static voidsetOptions(String options)Define a set of Macro options for the current Thread.static voidsetOptions(Thread thread, String options)Define a set of Macro options for a Thread.static StringtrimKey(String key)
-
-
-
Field Detail
-
MACRO_CANCELED
public static final String MACRO_CANCELED
- See Also:
- Constant Field Values
-
-
Method Detail
-
open
public static boolean open(String path)
-
saveAs
public static boolean saveAs(String path)
-
abort
public static void abort()
Aborts the currently running macro or any plugin using IJ.run().
-
getOptions
public static String getOptions()
If a command started using run(name, options) is running, and the current thread is the same thread, returns the options string, otherwise, returns null.- See Also:
GenericDialog,OpenDialog
-
setOptions
public static void setOptions(String options)
Define a set of Macro options for the current Thread.
-
setOptions
public static void setOptions(Thread thread, String options)
Define a set of Macro options for a Thread.
-
-