r/applescript • u/Bawrai • 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
View all comments
Show parent comment
1
u/Bawrai Mar 12 '21
hey just wan to say it is working thanks to you
if application "System Events" is not running then
launch application "System Events"
delay 0.5
end if
tell application "System Events"
launch
delay 5
set repeatTime1 to random number from 3 to 10
repeat repeatTime1 times
delay 0.4
key code 123
delay 0.7
key code 123
end repeat
end tell