Jump to content
brobbles

Trigger a workflow whenever clipboard changes?

Recommended Posts

Hi There,

 

I'm looking for solutions that'll let me trigger a workflow when the clipboard changes.  Any ideas? If there's not an easy way to do this, I'm open to exploring a harder way to do this like a little external program that triggers the Alfred workflow.  

 

Specifically, I want to perform a text transformation on the clipboard text, and update the clipboard to contain the transformed text. For full context here I want to replace the "dl?=0" at the end of Dropbox shared link urls to "?raw=1" so that my links actually link directly to the raw content, and don't have Dropbox chrome around them.  I have this set up right now to trigger on a keyboard command but would love to change things so that my workflow just triggers everytime the clipboard changes.  If the clipboard ever has "?dl=0" in it, I'll swap it out and change the clipboard data.

 

Any ideas? I have a crapper solution for this working with a Python script but since I work on multiple computers and already have all my Alfred settings syncing between them, would love to solve this just with Alfred.

Share this post


Link to post
32 minutes ago, brobbles said:

If there's not an easy way to do this, I'm open to exploring a harder way to do this like a little external program that triggers the Alfred workflow.

 

By design, Alfred Workflows need to be deliberately called. But they’re easy to trigger from another process, via AppleScript.


That said, since the action you want to perform is so simple, you might as well do everything in the script that detects clipboard changes, when you get that working. I’d ask on Ask Different.

Share this post


Link to post

Hi brobbles,

 

Did you ever get this working? I'd love to have the exact same workflow, this would finally make sharing my pictures on forums directly from the Finder so super easy... Way too many steps involved to do it manually, drives me nuts....

 

Cheers,
Lukas

Share this post


Link to post
1 minute ago, LukasM said:

sharing my pictures on forums directly from the Finder

 

That’s not what @brobbles was asking about. For your situation, won’t WebScreenshot work? You can upload images directly from the Finder to imgur.

 

Share this post


Link to post
54 minutes ago, vitor said:

 

That’s not what @brobbles was asking about. For your situation, won’t WebScreenshot work? You can upload images directly from the Finder to imgur.

 

 

Thanks for the reply. If I do what bobbles asked, I have the direct link to the photo that is already hosted on my Dropbox anyway, so it would be very easy to post the link into forum posts and just add the URL wrapper. Should even be easy to add that with another workflow, or even integrate it in the first workflow, I would assume? I'm definitely not a workflow expert though...

 

Do you know anybody that can set something like that up for me? I'll send you a PM.


Cheers,
Lukas

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