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?
delete
command does not respond to key modifiers. Why do you use (a sort of) GUI scripting rather than deleting the files directly?