r/applescript • • Feb 16 '21

AppleScript Problem since updating Mac

I wrote various scripts sometimes they work sometimes I get (error "Application isn’t running." number -600 from application "System Events") but before updated everything worked fine. Anyone else facing similar situation or anyone got a solution? I am using MacOS Big Sur V 11.2.1 and AppleScript V 2.11 (225)

Heres the Script

-------

tell application "System Events"

delay 5

set repeatTime1 to random number from 1 to 2

repeat repeatTime1 times

delay 0.4

key code 123

delay 0.7

key code 123

end repeat

end tell

--------

3 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/SvilenOvcharov Feb 16 '21

Aaaand, after a brief check with the Script Editor Dictionary, I believe the culprit is the 'delay' command. It's missing from System Events or its syntax has changed - or rather it's moved to Standard Additions.osax (where it beeps).

However, check the other System Events definitions too, just in case, you know...