Skip to content

Instantly share code, notes, and snippets.

@kristianhellquist
Created November 6, 2011 14:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kristianhellquist/1342958 to your computer and use it in GitHub Desktop.
Save kristianhellquist/1342958 to your computer and use it in GitHub Desktop.
AppleScript that opens a window with an Evernote
on alfred_script(theNote)
set AppleScript's text item delimiters to "#"
set theTextItems to text items of item 1 of theNote
set theTitle to item 1 of theTextItems
set tagsWithSpaces to the rest of theTextItems
set theTags to {}
set AppleScript's text item delimiters to " "
repeat with aTag in tagsWithSpaces
set end of theTags to item 1 of text items of aTag
end repeat
tell application "Evernote"
set newNote to create note title theTitle with text "" tags theTags
open note window with newNote
activate
end tell
end alfred_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment