Skip to content

Instantly share code, notes, and snippets.

@prenagha
Created June 22, 2012 18:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prenagha/2974449 to your computer and use it in GitHub Desktop.
Save prenagha/2974449 to your computer and use it in GitHub Desktop.
Launchbar to Prowl
--
-- Take text input from a launchbar action and send to iPhone via prowl
-- Put this file as ~/Library/Application Support/Launchbar/Actions/Prowl.scpt
-- Update prowlAPIKey in the script below
-- Then enter Launchbar, type "Prowl", once its selected hit "Space", then type
-- the text you want to send to your phone, hit "Enter"
--
on handle_string(s)
set prowlAPIKey to "xxxxxx"
set prowlURL to "https://prowl.weks.net/publicapi/add"
set prowlApplication to "Launchbar"
set pKey to "apikey=" & prowlAPIKey
set pApp to "application=" & prowlApplication
set pDesc to "description=" & s
set curlExec to "curl --url " & quoted form of prowlURL & " -F " & quoted form of pKey & " -F " & quoted form of pApp & " -F " & quoted form of pDesc
-- display dialog "CURL= " & curlExec
set curlExecResponse to do shell script curlExec
end handle_string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment