Posted by
Carnë Draug on
Mar 14, 2014; 4:10pm
URL: http://imagej.273.s1.nabble.com/Bug-report-File-directory-builtin-function-fails-in-batch-tp5006917p5006920.html
On 14 March 2014 15:45, Johannes Schindelin <
[hidden email]> wrote:
> Hi Carnë,
>
> On Fri, 14 Mar 2014, Carnë Draug wrote:
>
>> The macro builtin function "File.directory()" does not work when
>> starting ImageJ via command line -batch:
>>
>> 1) create a simple macro
>>
>> $ echo ''open (getArgument()); print (File.directory ());' >
>> ./macro_test.ijm
>
> I assume you meant a single single quote before the 'open'?
Yes, apologies for the mistake.
Inspecting it further, it actually returns a completely wrong answer.
I start FIJI normally. I go to "File > Open..." and select a figure
that is *not* on the FIJI directory. Then, "Plugins > Macros > Run
..." and select a macro with the single line "print (File.directory
());". The log window appears with the path for the FIJI directory. I
originally had the image on the same directory as FIJI so I didn't
notice that it was giving the wrong value there either.
Carnë
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html