Last Updated: February 25, 2016
·
775
· carlosefonseca

Add lines as Reminders

Add selected lines of text as new reminders.
Asks for what list.
Use as Automator service script.

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

Requires String library (add http://applescript.bratis-lover.net/library/string in ~/Script Libraries)

https://gist.github.com/8524793