Login  Register

Re: Passing arguments to plugins in a macro

Posted by BenTupper on Jan 27, 2010; 12:02pm
URL: http://imagej.273.s1.nabble.com/Passing-arguments-to-plugins-in-a-macro-tp3689580p3689581.html

Hi,

Check out ...

http://imagejdocu.tudor.lu/doku.php?id=howto:plugins:retrieving_the_optional_args_when_a_plugin_is_called_from_a_macro

CHeers,
Ben

On Jan 27, 2010, at 6:04 AM, Simon Andrews wrote:

> 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.


Cheers,
Ben