Posted by
Joachim Wesner on
Feb 19, 2010; 12:05pm
URL: http://imagej.273.s1.nabble.com/Including-a-named-variable-as-part-of-a-file-name-tp3689324p3689325.html
Hi Oliver,
this is easy and goes along that line
myFolder = xxxxx;
openstr = "open=[C:\\Documents and Settings\\" + myfolder +
"\\421_Test100000.BMP] number=50 starting=1 increment=1 scale=100 file=[]
or=[] sort";
run("Image Sequence...", openstr);
I don´t have a 100 working example at hand but i did similar in other
macros, I´m sure you can figure it out!
Mit freundlichen Grüßen / Best regards
Joachim Wesner
Oliver Tills
<oliver.tills@PLY
MOUTH.AC.UK> An
Gesendet von:
[hidden email]
ImageJ Interest Kopie
Group
<
[hidden email]. Thema
GOV> Including a named variable as part
of a file name
18.02.2010 19:52
Bitte antworten
an
ImageJ Interest
Group
<
[hidden email].
GOV>
Hi,
I'm writing a macro which is reading and writing to several subfolders.
The file and folder structure is the same in each folder that the macro is
writing to so rather than having to change the file path
throughout the macro when using it on a different folder I want to try and
make part of the file path specified in the macro a named variable so I can
just change this as needed.
i.e. something along the lines of..
myFolder = xxxxx
run("Image Sequence...", "open=[C:\\Documents and
Settings\\[folder]\\421_Test100000.BMP] number=50 starting=1 increment=1
scale=100 file=[] or=[] sort");
Is this possible and if so how do I go about it?
Many thanks,
Oli
[hidden email]<mailto:
[hidden email]>
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________