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.

 

http://url1.com,http://url2.com,http://url3.com

 

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

https://www.sharedcount.com/dashboard.php?urls=http://url1.com,http://url2.com,http://url3.com

 

How might one accomplish this?

 

Thanks in advance.

Link to comment

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 comment

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