Created
November 30, 2011 02:33
-
-
Save macolyte/1407722 to your computer and use it in GitHub Desktop.
Evernote Log LaunchBar Action
This file contains 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
on handle_string(the_text) | |
set time_string to do shell script "date '+%H:%M:%S'" | |
set date_string to do shell script "date '+%Y-%m-%d'" | |
set message to "<p><b>" & time_string & "</b> | " & the_text & "</p>" | |
tell application "Evernote" | |
set matches to find notes (date_string as text) & " notebook:Log" | |
if (count of matches) is 1 then | |
set the_note to item 1 of matches | |
append the_note html message | |
else if (count of matches) is 0 then | |
create note with html message title date_string notebook "Log" | |
else | |
display dialog "Hey jackass you've got more than one note with that date. Go fix it." | |
end if | |
end tell | |
end handle_string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment