|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectij.plugin.Macro_Runner
public class Macro_Runner
This class runs macros and scripts installed in the Plugins menu as well as macros and scripts opened using the Plugins/Macros/Run command.
Constructor Summary | |
---|---|
Macro_Runner()
|
Method Summary | |
---|---|
static boolean |
downloadJar(String url)
|
static String |
getFilePath()
Returns the file path of the most recently loaded macro or script. |
void |
run(String name)
Opens and runs the specified macro file (.txt or .ijm) or script file (.js, .bsh or .py) on the current thread. |
static String |
runBeanShell(String script,
String arg)
Runs a BeanShell script on the current thread, passing a string argument, which the script can retrieve using the getArgument() function. |
String |
runJavaScript(String script,
String arg)
Runs a JavaScript script on the current thread, passing a string argument, which the script can retrieve using the getArgument() function. |
String |
runMacro(String macro,
String arg)
Runs the specified macro on the current thread. |
String |
runMacroFile(String name,
String arg)
Opens and runs the specified macro or script on the current thread. |
String |
runMacroFromIJJar(String name,
String arg)
|
static String |
runMacroFromJar(String name,
String arg)
Runs the specified macro from a JAR file in the plugins folder, passing it the specified argument. |
static String |
runPython(String script,
String arg)
Runs a Python script on the current thread, passing a string argument, which the script can retrieve using the getArgument() function. |
static void |
setFilePath(String path)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Macro_Runner()
Method Detail |
---|
public void run(String name)
name
is an empty string. The macro or script is assumed to be in the ImageJ
plugins folder if name
is not a full path.
run
in interface PlugIn
public String runMacroFile(String name, String arg)
public String runMacro(String macro, String arg)
public static String runMacroFromJar(String name, String arg)
public String runMacroFromIJJar(String name, String arg)
public String runJavaScript(String script, String arg)
public static String runBeanShell(String script, String arg)
public static String runPython(String script, String arg)
public static boolean downloadJar(String url)
public static String getFilePath()
public static void setFilePath(String path)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |