Login  Register

Re: Auto-launching macros (was Re: startup)

Posted by Jeff Brandenburg on Jul 13, 2005; 7:34pm
URL: http://imagej.273.s1.nabble.com/Auto-launching-macros-was-Re-startup-tp3705027p3705028.html

On Jul 12, 2005, at 1:06 PM, Wayne Rasband wrote:

 > > I have a problem similar to Charlotte Holmes'.  I'd like to
 > > be able to open a macro and have it execute automatically,
 > > without the "Run" command.
 >
 > Macros named "AutoRun" execute automatically when they are opened or
 > installed. For example, the macro
 >
 >   macro "AutoRun" {
 >       run("Close"); // close text window
 >       print("This macro automatically runs when it is opened");
 >   }
 >
 > executes when you open it using File>Open or drag and drop it on
 > ImageJ. The run("Close") statement closes the text window that is
 > opened when you open a macro file.

Brilliant!  This is exactly what I need.  Thanks, Wayne!
--
        -jeffB (Jeff Brandenburg, Duke Center for In-Vivo Microscopy)