Jump to content

Combining multiple urls from clipboard into 1 search url?


Recommended Posts

I'm not sure if this would be a workflow or a custom web search. But here's what I'm trying to do.


I want to copy multiple urls, and then combine them all into a single query.


Use case:

I copy 4 different urls and then search for them on a site called sharedcount.com.




So I'd type 'shared count 3' for example, and it would merge clipboard urls 1, 2 and 3 in



How might one accomplish this?


Thanks in advance.

Link to post

I think that would be difficult to do exactly as you describe, at least with Alfred as your clipboard history manager, because it doesn't give you programmatic access to the clipboard history. That means you'd have to simulate keypresses and/or mouse clicks, which is a very slow and error-prone way to automate tasks, especially multi-step ones like this.
However, Alfred also has a very useful clipboard merging feature (Alfred Preferences > Features > Clipboard > Merging), where you do CMD+C, C (hold CMD down and double-tab C), and Alfred adds your selection to the clipboard contents instead of replacing them.

If you can use that feature, it'd be a lot easier to do what you're asking.


At most, you may need 2–3 lines of Python or Ruby code to re-combine the URLs in the correct way to pass to the search.

Link to post


This topic is now archived and is closed to further replies.

  • Create New...