I’m new to AppleScript as of today, but I’ve hit a small problem that a Google search didn’t seem to answer.
I have a folder full of JPEGs and want to find the first one. In my AppleScript there’s the line:
set theName to (get first file of folder aFolder as alias)
This works fine when the folder only contains jpegs, but sometimes the folder also contains other non-JPEG files.
What’s the best way (or any way) of finding the first JPEG, rather than the first file of any kind, in a known folder?
Thanks in advance