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. |
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 |
In reply to this post by simon andrews (BI)
what I have done is in my plugin there is a dialog to input the
parameters. after you have compiled the plugin, you can start the "record marco" command, and then ,you run you plugin. from the marco window, you will see how the command will be in your new marco. something like: run("plugin", "para1=value1 para2=value2 ....."); then you can write in your marco, use marcovalue1, marcovalue2 replace those values in the run()command. 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. |
In reply to this post by BenTupper
Thanks Ben,
Macro.getOptions() ...was the bit I was missing. It's all working fine now. Cheers Simon. On 27 Jan 2010, at 12:02, Ben Tupper wrote: > 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 |
Free forum by Nabble | Edit this page |