Jump to content

psborole

Level 1
  • Content Count

    5
  • Joined

  • Last visited

Posts posted by psborole


  1. I think I found the issue.  Instead of using 

    assign tag yr to theFile

    I should be using 

    assign tag yr to note1 (which is the name of my note created in evernote)

     

    The modified script is as below:

     

    tell application "Evernote"

    activate

     

    set the_date to item 1 of inputAttributes

     

    set yr to text -4 thru -1 of ("0000" & (year of the_date))

     

    set note1 to create note from file theFile notebook {"INBOX"} tags {"TAG 1", "TAG 2", "TAG 3"}

    assign tag yr to note1

    end tell

     

    Thanks for your help. one last off topic  request, can you help me with a good source for learning apple scripting?

     

    Thanks again for the help.


  2. I have a similar kind of an issue, Instead of adding tags from OS X, I want the tag as year from document attributes "Creation date" using Hazel. The code I have written for Hazel is as below (** I am very new to apple scripting. below code is a copy and little modified version of what i found on internet)

     

    tell application "Evernote"

    activate

     

    set the_date to item 1 of inputAttributes

     

    set yr to text -4 thru -1 of ("0000" & (year of the_date))

     

    create note from file theFile notebook {"INBOX"} tags {"TAG 1", "TAG 2", "TAG 3"}

    assign tag yr to theFile

    end tell

     

    This code does create note in my INBOX folder, but only assigns tags "TAG 1", "TAG 3" and "TAG 3" . How can I add the year of document creation as tag. Any guidance will be really helpful.

×
×
  • Create New...