Hello,
tested under Windows 10:
Window delivers the string:
C:\Users\Stefan\Downloads\IMG_20240531_132645.jpg
filePathFull = Dialog.getString();
delivers already the string (I guess it's intended):
C:/Users/Stefan/Downloads/IMG_20240531_132645.jpg
Therefore is no match with the Windows file separator "\".
Best regards
Stefan
Am 13.09.2024 um 13:44 schrieb CARL Philippe (LBP):
Dear all (probably Wayne),
the File.separator method is not working anymore under Windows when going from
the update v1.54i16 to the v1.54j as illustrated with the following macro code:
Dialog.create("Window for testing");
Dialog.addFile("Please select a file","");
Dialog.show();
filePathFull = Dialog.getString();
filePath = filePathFull.substring(0, lastIndexOf(filePathFull,
File.separator) + 1);
print(filePathFull);
print(filePath);
for which the second line will be empty after the update v1.54j.
Do not hesitate in the case you need additionnal information about my used OS
or configuration.
My best regards,
Philippe
Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 41 41
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html