Jump to content

Workflow to simulate using a keyboard shortcut on highlighted text

Recommended Posts

I run a softphone VOIP app for work (the RingCentral app). I'd like to be able to type a phone number into Alfred (or select it from a contact) and have it place a call, but RingCentral doesn't seem to have AppleScript support or much else that would help.


What it does have is a global keyboard shortcut. I can highlight a 10 digit number anywhere in the MacOS and use a keyboard shortcut to instantly dial the number.


Is there any way for Alfred to simulate highlighting some text and then using a keyboard shortcut? I'd like to pass the workflow some text by typing a number into Alfred, then have it "highlight" that text and do the keyboard shortcut for me.

Link to comment

Wow, thanks! Very helpful!


In the mean time I ended up also asking about this on the RingCentral development forum, and they let me know that the RingCentral softphone app has an undocumented URL scheme for placing calls as well. That turns out to be a cleaner approach. So in the end I'm using a bash script that looks like this:


number=$(echo "{query}" | sed 's/[^0-9+]//g')
open "rcmobile://call?number=${number}"


Thanks for the help!


Link to comment
  • 1 year later...

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...