Hello
I'm trying to create a macro to convert a png image file selected in finder into a jpeg.
I have the macro mostly working.
I want to check that the file extension of the selected file is .png
To do this I'm using Split Path.
Initially I tried checking if the "Extention to:" field was equal to png, but that didn't work. So to help me figure out why, I used an alert to display the values of all the Split Path fields to the screen, as shown in the screenshot.
Split Path seems to be adding an extra newline character after the file extension, in both its 'File name to:' and 'Extension to:' fields.
Could someone explain this behaviour? The same thing happens with all file extensions, not just png.
(I know I can work around this problem, by checking if the extension contains png rather than is equal to it.)