Login  Register

Re: Launch a macro from a command line

Posted by dscho on Jan 21, 2008; 2:55pm
URL: http://imagej.273.s1.nabble.com/Launch-a-macro-from-a-command-line-tp3697493p3697499.html

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