I’m not an expert at all when it comes to AppleScript, but I can understand a few things when I look at the code. I downloaded this script to activate a few keystrokes, wait a few seconds and then perform the Select All operation.
tell application "Finder" to activate
tell application "System Events"
keystroke "d" using {command down, option down, control down}
delay 5
keystroke "a" using {command down}
end tell
Now instead of waiting 5 seconds, is there a way to make it check if the window is ready to go, meaning, it’s upfront and ready to accept the “Select All” operation?
My goal is to perform that operation, regardless of Finder taking 1 second to open or 30 seconds.
Hope it makes sense. Thank you!
Model: MacBook Pro 2012
AppleScript: 2.11 (208)
Browser: Firefox 99.0
Operating System: macOS 12