Created
April 4, 2012 15:51
-
-
Save myles/2303114 to your computer and use it in GitHub Desktop.
Text File to Things Task using Dropbox and Hazel
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
tell application "Things beta" | |
set fileContents to read theFile using delimiter {linefeed} | |
repeat with currentLine in reverse of fileContents | |
set newToDo to make new to do with properties {name:currentLine} | |
end repeat | |
end tell |
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 {oldDelims, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {":"}} | |
set theFileName to last text item of (theFile as text) | |
set theName to text 1 thru -9 of theFileName | |
set theNote to read theFile as string | |
tell application "Things beta" | |
set newToDo to make new to do with properties {name:theName} | |
set notes of newToDo to theNote | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment