Created
January 17, 2014 15:55
-
-
Save epramono/8475787 to your computer and use it in GitHub Desktop.
This AppleScript will accept `begin <todo-item>` in Alfred and translate it to x-callback-url invocation on iOS - involving Command-C and Begin. Requires: Alfred 2 + Power Pack, Command-C 1.0, and Begin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
set theDevice to my urlencode("Eric Pramono’s iPhone") as string | |
set theQuery to my urlencode("{query}") as string | |
set theURL to "command-c://x-callback-url/copyText?deviceName=" & theDevice & "&text=beginapp%3A%2F%2Fx-callback-url%2FaddTasks%3Ftext%3D" & my urlencode(theQuery) | |
open location theURL | |
end tell | |
on urlencode(theurl) | |
return do shell script "php -r 'echo rawurlencode(\"" & theurl & "\");'" | |
end urlencode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment