Login  Register

Re: Launch a macro from a command line

Posted by lechristophe on Jan 21, 2008; 3:13pm
URL: http://imagej.273.s1.nabble.com/Launch-a-macro-from-a-command-line-tp3697493p3697500.html

On Jan 21, 2008 4:12 PM, Christophe Leterrier <
[hidden email]> wrote:

> Great, finally it works !
>
> Under OSX, to test a macro, I just have to use this as a command that I
> can launch from my favorite OSX editor, Smultron (http://smultron.sourceforge.net/
> ):
>
> [PATH TO IMAGEJ]/ImageJ.app/Contents/MacOS/JavaApplicationStub -macro %%p
>
> Note that %%p is a Smultron-specific shortcut for the current open
> document path
>
> The solution for XP using Notepad++ as an editor is in a previous mail of
> this thread.
>
> I guess I could sum up everything about macro writing and put it on the
> ImageJ wiki one of these days.
>
> Christophe Leterrier
>
>
>
>
>
>
>
>
> On Jan 21, 2008 3:55 PM, Johannes Schindelin < [hidden email]>
> wrote:
>
> > Hi,
> >
> > On Mon, 21 Jan 2008, Christophe Leterrier wrote:
> >
> > > Do anyone know how to do it in OSX, that is, what is the equivalent of
> > > the Windows command:
> > >
> > > C:\Imagej\ImageJ.exe -macro "my macro"
> > >
> > > in OSX ? I tried
> > >
> > > java -jar -mx256m ij.jar -macro "my macro"
> > >
> > > but I don't think it goes into the right folder... nothing happens.
> >
> > The easiest way to find out what is the correct command line is to look
> > into Contents/Info.plist in the ImageJ.app/ folder (e.g. via Finder's
> > context menu on the ImageJ icon; the action is called "Show Package
> > Contents").
> >
> > The key to look for is "CFBundleExecutable", and the command line is the
> >
> > corresponding string.
> >
> > Hth,
> > Dscho
> >
> >
>