Hi Mike,
I did it this way and it worked
-----------------------------------
function SaveXY () {
var path = getDirectory("image");
if(useIt==true) {
path = user_path;
}
saveAs("XY Coordinates", path+fileName+number+".txt");
showMessage("XY-Data saved to: "+path+fileName+number+".txt");
number++;
}
------------------------
number, fileName and path are global variables
number is a continous number counting up.
If the user didn´t gave a loaction (user_path) the, in this case
coordinates, are saved where the images
is located.
Hope that helps,
Cheers
robert
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
Michael Doube
Sent: Mittwoch, 1. März 2006 17:12
To:
[hidden email]
Subject: saveas window name + a tag
Hi all
Hopefully this is a 2-second problem.
I'd like to incoporate a saveAs("Jpeg", windowtitle+endtag.jpg) type of line
in a macro, but I just can't get it to work.
Basically, the macro opens 2 raw files and combines them as an anaglyph.
The anglyph is saved as a new file, whose name should be something like
rawfile1_anaglyph.jpg.
The macro looks like this at the moment:
run("Raw...", "image=8-bit width=1536 height=1536 offset=128 number=1
gap=0"); name=getTitle; tag="_anag.jpg"; run("RGB Color"); run("Raw...",
"image=8-bit width=1536 height=1536 offset=128 number=1 gap=0"); run("RGB
Color"); run("Two Shot Anaglyph"); saveAs("Jpeg", name+tag); close();
close(); close();
Cheers
Mike