Antwort: Re: Call plugin with arg from macro

Posted by Joachim Wesner on
URL: http://imagej.273.s1.nabble.com/Colocalisation-tp3696413p3696418.html

Hi William,

hmmm, I see, but this is the "options" string I mentioned that is also used
to passed Dialog options.
In my special case I could pretty easily rewrite the macro to do what I
want, (only one extra "option arg),
but it´s not the arg string that the run()  method gets. Any way to
directly set up that?

Maybe one way would be to use a special "Arg=" keyword in the argument
string, together with the
macro recorder/replayer, in that case the fields will not be passed to any
dialog field when replayed,
but to the arg string?

I.e.

   IJ.run("plugin1", "Arg=xxx Open=yyy Dialogopt=dlg");

"Arg=xxx" will be cutoff and given to the arg string, the rest will
work as before!

Just an idea

Thanx a lot.



                                                                           
             William O'Connell                                            
             <oconnell.w@GMAIL                                            
             .COM>                                                      An
             Gesendet von:              [hidden email]                
             ImageJ Interest                                         Kopie
             Group                                                        
             <[hidden email].                                       Thema
             GOV>                       Re: Call plugin with arg from      
                                        macro                              
                                                                           
             23.04.2008 04:14                                              
                                                                           
                                                                           
              Bitte antworten                                              
                    an                                                    
              ImageJ Interest                                              
                   Group                                                  
             <[hidden email].                                            
                   GOV>                                                    
                                                                           
                                                                           




Joachim,
I've passed an argument string from one plugin1 to plugin2 successfully.
plugin1
,,,,,,,,,,,,,,,,,,,,
   IJ.run("plugin1", "argument1");
....................

plugin2
............................
    String str =  Macro.getOptions();
............................

This might well work running the plugin from a macro.  Wayne offered this
method in a user reply some time ago.
Cheers, Bill



On Tue, Apr 22, 2008 at 2:03 PM, Joachim Wesner <
[hidden email]> wrote:

> Hi list,
>
> just wondering, is it (already?) possible to run a plugin from the macro
> language
> while simultaneously passing the String arg to the run method?
>
> (II´m not talking about the Dialog options)
>
> I think this might be useful (not just for me) and could be implemented
> quite easily
> via the call interface, but I wonder if it probably is already
implemented

> in some form!?
> (Or should be added to the macro language!?)
>
> Sincerely
>
> Joachim
>
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________