Re: How to determine the current macro name
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Dec 10, 2015; 7:14pm
URL: http://imagej.273.s1.nabble.com/How-to-determine-the-current-macro-name-tp5015202p5015208.html
> On Dec 9, 2015, at 8:46 AM, Stein Rørvik <
[hidden email]> wrote:
>
> Simple question:
>
> Is there any way an ImageJ macro can determine its own filename?
> That is, any way to read the name and file path of the currently loaded macro file?
Upgrade to the latest ImageJ daily build (1.50f19) and you can use getInfo("macro.filepath”) to get file path and name of the currently loaded macro or script. In a plugin or script, use Macro_Runner.getFilePath().
-wayne
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html