Autorun problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Autorun problem

Steve-2
Dear List,


For my update site, I have a startup ijm in macros/AutoRun that tells FIJI to install a *.txt file containing a bunch of functions. My plugins then use these functions. The problem is that if a user has a StartupMacros ijm in macros, anything in AutoRun is ignored. This situation breaks all my plugins. Does anybody know what is the best solution to this problem?


Steve

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autorun problem

ctrueden
Hi Steve,

> I have a startup ijm in macros/AutoRun that tells FIJI to install a
> *.txt file containing a bunch of functions. My plugins then use these
> functions. The problem is that if a user has a StartupMacros ijm in
> macros, anything in AutoRun is ignored. This situation breaks all my
> plugins. Does anybody know what is the best solution to this problem?

This behavior is hardcoded into ImageJ 1.x:


https://github.com/imagej/ImageJA/blob/v1.51k/src/main/java/ij/gui/Toolbar.java#L1398-L1401

https://github.com/imagej/ImageJA/blob/v1.51k/src/main/java/ij/plugin/Commands.java#L152-L161

I do not know a workaround.

My general advice would be to use ImageJ2 plugins to modify your ImageJ's
behavior, rather than startup macros, but would need to hear more about
what you are trying to achieve in order to comment in further detail.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Mon, Mar 27, 2017 at 10:23 AM, Steve <[hidden email]> wrote:

> Dear List,
>
>
> For my update site, I have a startup ijm in macros/AutoRun that tells FIJI
> to install a *.txt file containing a bunch of functions. My plugins then
> use these functions. The problem is that if a user has a StartupMacros ijm
> in macros, anything in AutoRun is ignored. This situation breaks all my
> plugins. Does anybody know what is the best solution to this problem?
>
>
> Steve
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autorun problem

Wayne Rasband-2
In reply to this post by Steve-2
> On Mar 27, 2017, at 11:23 AM, Steve <[hidden email]> wrote:
>
> Dear List,
>
>
> For my update site, I have a startup ijm in macros/AutoRun that tells FIJI to install a *.txt file containing a bunch of functions. My plugins then use these functions. The problem is that if a user has a StartupMacros ijm in macros, anything in AutoRun is ignored. This situation breaks all my plugins. Does anybody know what is the best solution to this problem?

You can add a call to your macro to the Edit>Options>Startup dialog, something like

    IJ.runMacroFile(IJ.getDir(“macros”)+”AutoRun/mystartup ijm”);

-wayne

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