Skip to content

Instantly share code, notes, and snippets.

@carlosefonseca
Last active January 3, 2016 21:59
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 carlosefonseca/8524793 to your computer and use it in GitHub Desktop.
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.
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