Jump to content

Workflow - Copy to Cliboard then highlight

Recommended Posts

Hi there...


I currently have a simple workflow that takes a keyword + a value then creates a SQL query based on the value and pasts it into my SQL editor (I have "Automatically paste to front most app" checked)

This works super well but I'd like to immediately highlight the pasted text after it is copied to the app (so I can cmd + R to run the highlighted query.)


Is this remotely possible? 


Any thoughts or guidance would be awesome.

Link to post

Welcome @jreljac,


5 hours ago, jreljac said:

so I can cmd + R to run the highlighted query


Doesn’t your editor run the entire line the query is on, if nothing is selected?


5 hours ago, jreljac said:

Is this remotely possible?


Yes, but it’s not pretty. macOS has good sortcuts to interact with text, such as ⇧→ to select text, ⌥→ to jump whole words, and ⌘→ to jump lines. One solution would be to to a letter count on your query, paste it, then ⇧← that number of times. Or you could add {cursor} behind your text in the Copy to Clipboard node, making Alfred move the cursor there, then send ⇧⌘→.

Link to post

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