Login  Register

Passing arguments to plugins in a macro

Posted by simon andrews (BI) on Jan 27, 2010; 11:04am
URL: http://imagej.273.s1.nabble.com/Passing-arguments-to-plugins-in-a-macro-tp3689580.html

I've written a plugin which puts up a configuration dialog in normal  
operation so the user can tweak the settings.  I want to be able to  
run this plugin from within a macro in a non-interactive way.

I've tried to do this by parsing the arguments passed to the setup  
method - but I can't seem to get them to appear in the macro.

For example if I put in the macro:

run("My Plugin")

The plugin runs and the args string is empty,

but if I run:

run("My Plugin","Some args")

..then the args String passed to the setup method is still empty.

I'm sure I'm just misunderstanding how this works.  Could someone  
please explain how to pass data from a macro to a plugin.

Thanks

Simon.