Jump to content
jreljac

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.

Share this post


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 ⇧⌘→.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...