Jump to content

Pass keyboard shortcut to an app


Recommended Posts

Hello,

 

I've got a workflow which launches an app using a keyboard shortcut.

 

After the app launches, I want to pass it a keyboard shortcut to execute a menu command.

 

Is this possible? If so how?

 

Thank you!

 

That can be done using AppleScript. Here's an example of performing such an action

tell application "Safari" to activate
tell application "System Events" to keystroke "D" using command down

You would just need to tie a workflow hotkey trigger to a Run Script or Run NSAppleScript (if you use Run Script, don't forget to set your language to /usr/bin/osascript).

 

Thank should get you going!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...