Created
December 19, 2011 11:03
-
-
Save mschae/1496664 to your computer and use it in GitHub Desktop.
Alfred iCal Todo Script
This file contains 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
on alfred_script(q) | |
tell application "iCal" | |
set newtodo to (make new todo at end of todos of calendar "Reminders") | |
tell newtodo | |
if "!!!" is in q then | |
set priority to high priority | |
else if "!!" is in q then | |
set priority to medium priority | |
else if "!" is in q then | |
set priority to low priority | |
end if | |
set asid to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to {"!"} | |
set textItems to text items of q | |
set AppleScript's text item delimiters to asid | |
set todoSummary to textItems as string | |
set summary to todoSummary | |
end tell | |
end tell | |
end alfred_script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment