Reputation: 25
I have this script that I have been working on to clear out my Caches and application support files I will skip to the part that I need help with;
tell application "System Events"
keystroke "o" using {command down}
delay 0.5
keystroke delete using {command down}
end tell
When the script gets to the keystroke delete using {command down} I get the error message;
error "System Events got an error: Can’t continue using." number -1708
How can I improve?
Upvotes: 2
Views: 5340
Reputation: 3792
You use not keystroke
, but the related key code
to access special keys.
tell application "System Events"
key code 51 using {command down}
end tell
See full reference of key codes here.
Upvotes: 11