alfredo Posted January 24, 2013 Posted January 24, 2013 This may already be possible, but I'm looking for a way to launch Alfred, pre-populated with text, from another application. I am playing around with popclip (http://pilotmoon.com/popclip/), and would like to create an extension to send selected text to Alfred. Thanks
Florian Posted January 24, 2013 Posted January 24, 2013 I believe the only way to do that for now is to use the "keystroke" command. tell application "System Events" keystroke " " using option down delay 0.2 keystroke "some text" end tell
Vero Posted January 24, 2013 Posted January 24, 2013 You can already use selected text in OS X or your current clipboard content when starting your workflow with a hotkey, so have a look at these options in case they do what you're looking for without custom scripts
Nick Moore Posted May 24, 2013 Posted May 24, 2013 (edited) I'm the developer of PopClip, and I found this thread whilst was looking to make this very extension too. (I have had several requests for it from users.)Whilst the AppleScript above would work, it is dependent on the user's hotkey settings, and it is a little clunky in operation. What I would need is the ability to use an AppleScript something like this: tell application "Alfred" appear with text "Some example text" end tell The whole idea is to be able to activate Alfred via PopClip using the mouse only, without needing to press the hotkey. Here is an animated GIF example of how the PopClip integration would work (I built this one using the System Events applescript):(FYI - More about PopClip Extensions) Edited May 24, 2013 by Nick Moore
jdfwarrior Posted May 24, 2013 Posted May 24, 2013 I'm the developer of PopClip, and I found this thread whilst was looking to make this very extension too. (I have had several requests for it from users.) Whilst the AppleScript above would work, it is dependent on the user's hotkey settings, and it is a little clunky in operation. What I would need is the ability to use an AppleScript something like this: tell application "Alfred" appear with text "Some example text" end tell The whole idea is to be able to activate Alfred via PopClip using the mouse only, without needing to press the hotkey. Here is an animated GIF example of how the PopClip integration would work (I built this one using the System Events applescript): (FYI - More about PopClip Extensions) You mean something like.. tell application "Alfred 2" to search "Example Text" ? Nick Moore 1
Carlos-Sz Posted May 24, 2013 Posted May 24, 2013 I’ve been using PopClip and Alfred a lot. Great to hear an Alfred extension for PopClip is coming. I’ll surely try it.
Nick Moore Posted May 30, 2013 Posted May 30, 2013 (edited) You mean something like.. tell application "Alfred 2" to search "Example Text" ? Exactly that! Edited May 30, 2013 by Nick Moore
Nick Moore Posted June 21, 2013 Posted June 21, 2013 (edited) Thanks everyone for your help. The Alfred extension for PopClip is now available: http://pilotmoon.com/popclip/extensions/page/Alfred Edited June 21, 2013 by Nick Moore
Andrew Posted June 21, 2013 Posted June 21, 2013 Thanks everyone for your help. The Alfred extension for PopClip is now available: http://pilotmoon.com/popclip/extensions/page/Alfred Hah, that's great, thanks Nick! [gonna tweet that now]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now