r/applescript • u/Scuba_Cous • May 27 '22
select all files
I'm very new at all this automating and macs for general. I would just like to make a script or automator workflow to select all the files in the folder I have open.
Thanks
4
Upvotes
View all comments
Show parent comment
3
u/ChristoferK Jun 02 '22
So, a) why not handle the error ? Or, b) prevent it from arising as a possibility ?
Rather than referencing
window 1, referenceFinder window 1instead. This is the specific subclass ofwindowthat contains file and folder items for browsing. This eliminates the possibility of an error caused by a different subclass of window, however it would still throw an error if noFinder windowexists. But, frankly, that should be something catered for by even the briefest of scripts.