search and replace a string in the clipboard?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

search and replace a string in the clipboard? Thu Apr 02, 2020 12:04 pm • by zeltak
Hi

I have a process in Hazel where I rename a screenshot, generate a dropbox link (via a workflow) and move the link to the clipboard. This is all based on one hazel workflow with rules. I need to change in the generated link each time a string from `dl=0` to `raw=1`

ie:

`https://www.dropbox.com/s/4uu2fsrr8g9se33/ppic8.png?dl=0`

to

`https://www.dropbox.com/s/4uu2fsrr8g9se33/ppic8.png?raw=1`


how does one do so in Hazel as part of my rules? is AppleScript the only way to do so? And if so are there any examples anyone has?

thx so much in advance

Z
zeltak
 
Posts: 1
Joined: Thu Apr 02, 2020 11:37 am

This would need a script of some sort. I don't recall if someone here has done it before but I suggest searching the forums.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support