Dear Daniyard,
The "getDirectory" command will ask you where you want to save each time, instead of automatically saving to a particular folder. If this is what you want to do, then this slightly modified version of your code should take care of the saving without an extension problem.
dir = getDirectory("choose where to save");
run("Measure");
name = getTitle;
dotIndex = indexOf(name, ".");
name = substring(name, 0, dotIndex);
saveAs("Results", dir + name + ".csv");
Hope that at least gets you pointed in the right direction.
Best,
Christine
--------------------------------------------
Christine Labno, Ph.D.
Asst. Technical Director
Light Microscopy Core
University of Chicago
Office of Shared Research Facilities
KCBD 1250 900 E. 57th St.
(773) 834-9040 (phone)
________________________________________
From: ImageJ Interest Group [
[hidden email]] on behalf of Daniyard [
[hidden email]]
Sent: Thursday, June 13, 2013 6:19 AM
To:
[hidden email]
Subject: save results table as csv with custom name
Dear all,
I am just writing a macro. The purpose is to save multipoint selection
coordiantes in a csv file using the name of the image. it dows what I want
until the point that it saves either as a fixed name.csv or just as the
image title but with no extension. The following macro I used (I found parts
of this macro also here in the forum):
run("Measure");
name = getTitle;
dotIndex = indexOf(name, ".");
name = substring(name, 0, dotIndex);
saveAs("Results", getDirectory("home") +name);
Thanks a lot.
Daniyard
--
View this message in context:
http://imagej.1557.x6.nabble.com/save-results-table-as-csv-with-custom-name-tp5003427.htmlSent from the ImageJ mailing list archive at Nabble.com.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html