Problem with Duplicate in batch macro
Posted by Adam Goode on Aug 18, 2010; 9:21pm
URL: http://imagej.273.s1.nabble.com/Problem-with-Duplicate-in-batch-macro-tp3687187.html
Hi,
I have this macro:
var z = getImageID();
print(z);
selectImage(z);
run("Duplicate...", "title=item2");
var z2 = getImageID();
print(z2);
selectImage(z);
selectImage(z2);
I if run like this it works:
java -jar ij.jar test1.png test.txt
I get this in the log:
-2
-3
If I run in batch:
java -jar ij.jar test1.png -batch test.txt
I get this:
-2
-3
Image -2 not found or no images are open.
This happens with 1.44e and 1.44f11.
Note that if I add the image to the macro directly and not on the
command line:
open("test.png");
then everything works, in batch mode and not:
java -jar ij.jar -batch test2.txt
-2
-3
Any ideas?
Thanks,
Adam