I am trying to save my results with a custom filename. I figured out how to get filename from photo and replace “.tif” with “.csv”.
But my current challenge is using the data of unit. Because each SEM photo I use have different units (µm or nm). I manually enter this data while I set the scale but I do not know how I can get this info and use on filename part of my macro code.
My current macro code for it this:
//saving the file name = getTitle; dotIndex = indexOf(name, ".tif"); title = substring(name, 0, dotIndex); saveAs("Results", "/Users/macbook/Desktop/"+title+".csv");
At the end I need the filenames like that [title+um or nm]
Can anybody help me on this?
Thanks a lot in advance!