Skip to content

Instantly share code, notes, and snippets.

@kogakure
Created January 15, 2010 16:36
Show Gist options
  • Select an option

  • Save kogakure/278183 to your computer and use it in GitHub Desktop.

Select an option

Save kogakure/278183 to your computer and use it in GitHub Desktop.
AppleScript: Import into Things from File (each line a todo item)
set myFile to (choose file with prompt "Select a file to read:")
open for access myFile
set fileContents to read myFile using delimiter {linefeed}
close access myFile
tell application "Things"
repeat with currentLine in reverse of fileContents
set newToDo to make new to do ¬
with properties {name:currentLine} ¬
at beginning of list "Next"
-- perform some other operations using newToDo
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment