Login  Register

Re: getArgument() equivalent for installed macros?

Posted by Gabriel Landini on Jan 18, 2017; 3:43pm
URL: http://imagej.273.s1.nabble.com/getArgument-equivalent-for-installed-macros-tp5017917p5017918.html

On Wednesday, 18 January 2017 10:19:45 GMT Bill Christens-Barry wrote:
> In ImageJ I would like to pass a value from a macro in a text window to a
> macro that has been installed.
 
> The runMacro(name, arg) command will pass an argument to a macro that will
> be run from a file, and this argument can be handled in the called macro
> using the getArgument() command. But this entails opening the file
> containing a called macro, rather than running an already installed macro.

Hi Bill,
Does it require to have the other macro open?
I had the idea (maybe wrong) that if the macro is just in the plugins folder
and is visible to IJ (i.e. it has a "_" in the name) you can call it from
another macro and the 2nd macro gets the argument the way you suggested.

Cheers
Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html