Package ij
Class Macro
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 String
MACRO_CANCELED
-
Constructor Summary
Constructors Constructor Description Macro()
-
Method Summary
Modifier and Type Method Description static void
abort()
Aborts the currently running macro or any plugin using IJ.run().static String
eval(String code)
Evaluates 'code' and returns the output, or any error, as a String (e.g., Macro.eval("2+2") returns "4").static String
getDir(String path)
static String
getName(String path)
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.static String
getValue(String options, String key, String defaultValue)
static boolean
open(String path)
static boolean
saveAs(String path)
static void
setOptions(String options)
Define a set of Macro options for the current Thread.static void
setOptions(Thread thread, String options)
Define a set of Macro options for a Thread.static String
trimKey(String key)
-
Field Details
-
MACRO_CANCELED
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Macro
public Macro()
-
-
Method Details
-
open
-
saveAs
-
getName
-
getDir
-
abort
public static void abort()Aborts the currently running macro or any plugin using IJ.run(). -
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
Define a set of Macro options for the current Thread. -
setOptions
Define a set of Macro options for a Thread. -
getValue
-
trimKey
-
eval
Evaluates 'code' and returns the output, or any error, as a String (e.g., Macro.eval("2+2") returns "4").
-