Posted by
Winnok H. De Vos on
Jun 09, 2009; 4:24pm
URL: http://imagej.273.s1.nabble.com/spaces-in-filenames-tp3692208p3692211.html
Dear List
Just after I sent this mail I found out that the ... should have been
omitted after 'openasstring'.
(run("Results...", "openasstring=["+path+"]");)
This code was probably a remnant from an older version.
Thanks anyway.
Regards,
WInnok
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Winnok
De Vos (ugent)
Sent: dinsdag 9 juni 2009 18:17
To:
[hidden email]
Subject: Opening results file in a macro
Dear ImageJ users
I seem to have encountered a similar problem as reported before, but I
didn't find any solutions, so therefore I'll try to relaunch the question:
I can no longer open a results file automatically when given a directory
obtained by getDirectory("");
E.g. suppose a 'testresults.txt' file is to be opened.
dir=getDirectory("");
path=dir+"testresults.txt";
run("Results...", "openasstring...=["+path+"]");
This piece of code results in a dialog that still demands the user to select
the results file.
Is this a bug or I'm a overlooking something trivial? I'm running imageJ
1.42q on a pc (vista).
Thanks in advance.
Regards,
winnok
Approved-By: [log in to unmask]
Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
Message-ID: <[log in to unmask]>
Date: Tue, 24 Mar 2009 16:08:08 +0800
Reply-To: ImageJ Interest Group <[log in to unmask]>
Sender: ImageJ Interest Group <[log in to unmask]>
From: Adam Cliffe <[log in to unmask]>
Subject: Opening Results Problem/Bug?
Hi, Part of the macro I'm writing involves opening a results table which
ImageJ saved previously. The section I'm having problems with is this: macro
"bug example" { G_Ddir=getDirectory("choose folder"); G_jobName="test";
string="openasstring...=" + G_Ddir + G_jobName + "_basic.xls";
run("Results...", string); } It should open the results of an the Image
called G_jobName, so in this case, a file called test_basic.xls This bit of
code runs fine on my Mac (using IJ 1.42l and Java 1.5.0_16) but when I run
the same piece of code on ImageJ on a PC it doesn't work... (64bit PC,
ImageJ1.42I or 1.42k) not only that but it actually causes ImageJ to crash
and close... Just before it crashes it opens a window called "documents"
which looks a bit like the results table It returns this value as the
variable string= openasstring...=C: \Documents and
Settings\mikiko\Desktop\test_out\test\test_basic.xls Does anyone have any
suggestions? Thanks Adam Dr Adam Cliffe Research Fellow Rørth Lab Cell
Migration Group Temasek Lifescience Laboratory 1 Research Link National
University of Singapore Singapore 117604 tel: (65) 6872 8406 fax: (65) 6872
7007
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.339 / Virus Database: 270.12.58/2164 - Release Date: 06/08/09
17:59:00