I know you can make a system prompt for opening a certain type of file, like:
set directory to POSIX path of ( choose file of type (“public.image”) with prompt …
But instead of filtering for files by type, can I use file extensions instead? It sounds pretty straightforward but I haven’t found the answer in my poking around the AS dictionary.
Great solutions all, but let me complicate things further: this script is to prompt the user to open a file with a custom extension. Underneath, the file type is supposed to really be TEXT, but for some reason not all of them are recognized as such when I use “of type {“TEXT”}”.
That’s why I was hoping the bypass the filetype completely and only look at the custom file extension since that’s unique to any doc created by this app.
(To clarify: older versions of the app stuck to making these .abcd files of type TEXT, but the newer version didn’t. That’s why I was thinking to just look at that .abcd file extension which is always present.)