Jump to content

Using Text in the Clipboard as part of the link for "Open URL"


Recommended Posts

Hey all,

 

I'm looking to do something that seems simple but I can't figure out how to create a proper workflow to help me out. 

 

Basically I want to copy a piece of text and then using a hotkey, have a new website opened with that text as part of the URL.

 

So I want to hit one key and have a selection of text, say "4433" take me to www.google.com/4433. 

 

Any ideas?

 

Thanks in advance for everyone's help - I really appreciate it! 

 

-Alex

Link to post

Hey all,

 

I'm looking to do something that seems simple but I can't figure out how to create a proper workflow to help me out. 

 

Basically I want to copy a piece of text and then using a hotkey, have a new website opened with that text as part of the URL.

 

So I want to hit one key and have a selection of text, say "4433" take me to www.google.com/4433. 

 

Any ideas?

 

Thanks in advance for everyone's help - I really appreciate it! 

 

-Alex

 

Try hooking up a 'Hotkey' Trigger to a 'Open URL' Action. Set the Hotkey's 'Argument' field to 'OS X Clipboard Contents'. In the 'Open URL' Action, put {query} wherever you need the clipboard's contents.

 

You could also set it up to use whatever is selected in OS X, without copying. Set the Hotkey's 'Argument' field to 'Selection in OS X'

 

Cheers :)

Link to post
  • 7 years later...

Hello,

 

I'm new to Alfred and I have tried the workflow like described. However, if I choose the 'selected text' nothing is being passed on to the URL. However, with argument 'clipboard' the same text is being passed on and it works fine.

 

Is there something that might be wrong with the text selection in Safari? I have PopClip installed but disabling it didn't help.

 

Any help help would be appreciated.

Link to post

Hi @Feuizl, welcome to the forum.

 

Could you upload your workflow somewhere (Dropbox?) and post a link so we can have a look?

 

We can’t tell you what’s going wrong with a workflow we haven’t seen.

 

PopClip shouldn’t interfere with Alfred.

 

You should also check that you’ve granted Alfred all the permissions it needs. I believe it needs “Accessibility” for “selected text” to work.

Edited by deanishe
Link to post

It works fine. It's probably a permissions issue. Go into Alfred Preferences > General > Request Permissions… and make sure Alfred has all the permissions it requires, especially Accessibility.

 

It that doesn't work, go into System Preferences > Security & Privacy > Accessibility. Remove Alfred, then re-add it.

Link to post

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