0

This is my current code:

tell application "Finder"

    tell application "System Events" to keystroke "k" using {command down}

end tell

But it won't work.

Any tips?

1 Answer 1

1

You do not tell the Finder to tell system events to do stuff.

You need to just make sure the Application that you want to intercept the keystrokes is active. Then tell System events to do the keystroke.

tell application "Finder" to activate
tell application "System Events"

    keystroke "k" using {command down}

end tell

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.