DJay Posted March 16, 2013 Posted March 16, 2013 Had a script with Alfred V1 but can't bring it to work with V2. Somebody talented? http://d.pr/f/4BH6 --- SCRIPT BEGINS HERE --- on alfred_script(q) try set the clipboard to (do shell script "curl " & quoted form of ("http://tinyurl.com/api-create.php?url=" & (do shell script "perl -e 'use URI::Escape; print uri_escape(\"" & "http://lmgtfy.com/?q=" & q & "\")';"))) Growl("LMGTFY Link Copied", "Your victim awaits.", "LMGTFY", "Alfred") on error ErrorMessage number ErrorNumber if ErrorNumber is 6 then Growl("LMGTFY Error", "Could not connect to the internet.", "LMGTFY", "Alfred") else Growl("LMGTFY Error " & ErrorNumber, ErrorMessage, "LMGTFY", "Alfred") end if --if (do shell script "defaults read com.zibity.donate nonsence &") = "yes" then do shell script "afplay /Users/Sebastian/Desktop/nonsencenonsencenonsence.mp3 &" end try end alfred_script on Growl(tit, desc, iden, icon) tell application "Growl" to notify with name "Extension Output" title tit description desc application name "Alfred" identifier iden image from location "~/Library/Application Support/Alfred/extensions/applescripts/LMGTFY/icon.png" end Growl
jdfwarrior Posted March 16, 2013 Posted March 16, 2013 Had a script with Alfred V1 but can't bring it to work with V2. Somebody talented? http://d.pr/f/4BH6 --- SCRIPT BEGINS HERE --- on alfred_script(q) try set the clipboard to (do shell script "curl " & quoted form of ("http://tinyurl.com/api-create.php?url=" & (do shell script "perl -e 'use URI::Escape; print uri_escape(\"" & "http://lmgtfy.com/?q=" & q & "\")';"))) Growl("LMGTFY Link Copied", "Your victim awaits.", "LMGTFY", "Alfred") on error ErrorMessage number ErrorNumber if ErrorNumber is 6 then Growl("LMGTFY Error", "Could not connect to the internet.", "LMGTFY", "Alfred") else Growl("LMGTFY Error " & ErrorNumber, ErrorMessage, "LMGTFY", "Alfred") end if --if (do shell script "defaults read com.zibity.donate nonsence &") = "yes" then do shell script "afplay /Users/Sebastian/Desktop/nonsencenonsencenonsence.mp3 &" end try end alfred_script on Growl(tit, desc, iden, icon) tell application "Growl" to notify with name "Extension Output" title tit description desc application name "Alfred" identifier iden image from location "~/Library/Application Support/Alfred/extensions/applescripts/LMGTFY/icon.png" end Growl Sufficient? http://cloud.dferg.us/CqIL
DJay Posted March 16, 2013 Author Posted March 16, 2013 (edited) sweet! great. thanks a lot. now I have all my Alfred V1 helpers back. Edited March 16, 2013 by DJay
jdfwarrior Posted March 16, 2013 Posted March 16, 2013 sweet! great. thanks a lot. now I have all my Alfred V1 helpers back. Awesome, happy to help
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