Last active
January 3, 2016 21:59
-
-
Save carlosefonseca/8524793 to your computer and use it in GitHub Desktop.
Add selected lines of text as new reminders. Asks for what list. Use as Automator service script. Requires http://applescript.bratis-lover.net/library/string/ to be a Script Library.
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 run {input, parameters} | |
set input to (first item of input) | |
tell script "_string" to set input to trimBoth(input) | |
set lst to every paragraph of input | |
tell application "Reminders" | |
activate | |
set aList to (name of lists) | |
set theList to some list whose name is (first item of (choose from list aList)) | |
tell theList | |
repeat with s in lst | |
tell script "_string" to set s to trimBoth(s) | |
make new reminder with properties {name:s} | |
end repeat | |
end tell | |
end tell | |
return input | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment