Re: How to determine the current macro name
Posted by
Gabriel Landini on
Dec 10, 2015; 4:31pm
URL: http://imagej.273.s1.nabble.com/How-to-determine-the-current-macro-name-tp5015202p5015207.html
On Thursday 10 Dec 2015 14:10:14 you wrote:
> I need this because I maintain one macro that I put in different
> directories, and the macro should behave differently depending on where its
> current location is.
>
> I launch the macro from the command line on Windows.
>
> I tried to read File.directory and File.name but they are both blank.
>
> getList("window.titles") also does not work because there is no open macro
> window.
>
> Is there some java property that I can read somewhere to determine the
> location and name of the macro that was launched from the command line?
Hi
Not exactly what you asked and not sure it would work, but I wonder if you
could create a txt file in the folder where you put the macro. The file could
contain a value or string that tells the macro where it is running from.
Cheers
Gabriel
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html