Monthly Archives: August 2013

clipboardToReminders

set rLists to {}
tell application "Reminders"
	set todo_accounts to every account
	repeat with i from 1 to length of todo_accounts
		set todo_lists to get every list
		repeat with j from 1 to length of todo_lists
			tell list j
				set end of rLists to (get name)
			end tell
		end repeat
	end repeat
end tell
set myRList to choose from list rLists with title "Save these clipboard as Reminder(s)" with prompt (get the clipboard) without multiple selections allowed
if myRList is not false then
	tell application "System Events"
		set myText to paragraphs of (the clipboard as text)
	end tell
	repeat with myLine in myText
		if length of myLine is greater than 0 then
			tell application "Reminders"
				tell list (item 1 in myRList)
					make new reminder with properties {name:myLine}
				end tell
			end tell
		end if
	end repeat
end if
]]>