Jump to content
Ever Better: Refreshing the Evernote Brand Read more... ×
  • 1
Sign in to follow this  
DTLow

Scripting on a Mac (Applescript): Keyword Insert

Idea

For a scripting overview, see Scripting on a Mac (AppleScript)

The use of this script is to insert a keyword into a note, or attachment; for example Tag: Sample33515842_ScreenShot2018-07-15at21_37_00.png.b5796c3d4e145ff98bf3d45af743838d.png

  • Evernote's tag feature only works at the note level.
  • Keywords can be inserted anywhere in the contents
    Notes are retrieved using the text search feature; 
    for example  search "Tag: Sample"

The keyword is retrieved from the Tag list, starting at the top level and drilling down to the bottom level

set the clipboard to "Tag: " & Get_Keyword()

on Get_Keyword()
     
tell application "Evernote" to set theList to name of every tag whose parent is equal to missing value           -- Top Level List
     
repeat while count of theList > 0
         
set theList to simple_Sort(theList)
          set theTag to item 1 of (choose from list theList with prompt "Select Keywod") -- Choose from List
          set the clipboard to "Tag: " & theTag
           set theList to Child_List(theTag)                                                                          -- Drill down to the next level   
     end repeat
     
return theTag
end Get_Keyword

on Child_List(parentName)
     
set theList to {}
     
tell application "Evernote"
          
set parentTag to tag parentName
          
set theList to name of every tag whose parent is equal to parentTag
     
end tell
      return theList
end Child_List

Share this post


Link to post

0 replies to this idea

Recommended Posts

There have been no replies to this idea yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×