Created
January 15, 2010 16:36
-
-
Save kogakure/278183 to your computer and use it in GitHub Desktop.
AppleScript: Import into Things from File (each line a todo item)
This file contains hidden or 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
| 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