Jump to content

Can someone help me with a simple script?


Recommended Posts

Posted

Hello

I hope I am posting in the right place.  I have been an Evernote user for a long time. I'm not able to script and for the most part I'm just happy to borrow little snippets of things.

Anyway, I've noticed some changes with the new build and suddenly the script I was using to transfer files to Evernote no longer works. I use Hazel to trigger certain actions, including adding files to Evernote. Until a couple of days ago. For example, I had this script:

 

tell application "Evernote"

activate

«event EVRNcrnt» given «class kfil»:theFile, «class Ennb»:{"French"}, «class Engg»:{"Fred"}

end tell

I.e. An action would trigger a file to go to the Notebook "French" and add the tag "Fred". But now this now longer works. It Can someone help me with a super-simple script that will work with the new build simply to file to a certain notebook and give a tag? That would be so amazing.

Thanks in advance for any help!!!

Best,

Greg

 

  • Level 5*
Posted
48 minutes ago, grayner said:

Anyway, I've noticed some changes with the new build and suddenly the script I was using to transfer files to Evernote no longer works.

With the "new build" you switched to the Version 10 product
and you're using Applescript, which is not yet supported (hoping for an upcoming update) 

Install Evernote Legacy at https://help.evernote.com/hc/en-us/articles/360052560314?fbclid=IwAR2TNqp-eGRH3Ds8Vfu-CiKPjYolJzZ_keR9eWQaDahJ2GN-7hwn595zI8w&__s=bsetfdgzirbvqtopurph

Your script says    tell application "Evernote"
Two choices   
1. Change the script to  tell application "Evernote Legacy"      
2. Rename the app    EvernoteLegacy.app  >  Evernote.app

  • Like 3
Posted

Hello and thank you in advance...

I am moving to a new Macbook and I am trying to recreate an apple script that was working on my old machine in Hazel not it is not compiling...

Here is the script:

tell application "Evernote"
    activate
    create note from file theFile notebook {"Notebook Name"} tags {"Tag Name"}
end tell

This script gets hung up on "note".

I have tried changing application to application id com.evernote.evernote (I cant find my notes, but I found the exact syntax from on of these forum.) and I got the same result.

Any ideas?
 

Thank you!

  • Level 5*
Posted
2 minutes ago, dpbklyn said:

I am moving to a new Macbook and I am trying to recreate an apple script that was working on my old machine in Hazel not it is not compiling...

See answer above

Posted

My Evernote Applescripts have stopped working as of about a month ago (October 2020). I'm on macOS 10.15.7 (Catalina) and Evernote 10.3.7. Seems to have occurred right after I upgraded to Evernote.

Essentially, the entire script got mangled so that it's not looking at all like Applescript, but something else. Here's a snippet:

tell application "Evernote"
    
    (* Ensure that we're starting off clean *)
    «event EVRNsync»
    
    set matches to «event EVRNfind» "opti sail water -security -waste -sauce -vwmare -onelogin"
    if (count of matches) > 0 then
        «event EVRNassn» «class EVtg» "opti" given «class EV13»:matches
        «event EVRNassn» «class EVtg» "optimist" given «class EV13»:matches
        «event EVRNassn» «class EVtg» "dinghy racing" given «class EV13»:matches
        «event EVRNassn» «class EVtg» "sailing" given «class EV13»:matches
        «event EVRNassn» «class EVtg» "sailboat racing" given «class EV13»:matches
        «event EVRNsync»
    end if

 

Any ideas why this happened and how to fix?

Unfortunately, because Applescripts are stored in a binary format, I can't open in a text editor (like VS Code) to keep the Applescript editor from making this change.

  • Level 5*
Posted
12 minutes ago, Al Sargent said:

My Evernote Applescripts have stopped working as of about a month ago (October 2020). I'm on macOS 10.15.7 (Catalina) and Evernote 10.3.7. Seems to have occurred right after I upgraded to Evernote.

I moved your post to the Version 10 forums and merged with an ongoing discussion

Applescript is not yet supported with the Version 10 product   
In the meantime, my solution was to downgrade to the Legacy product

Posted

Has anyone else's folder automation suddenly stopped working?  I don't use it everyday so I'm not exactly sure when it happened but I believe sometime after the latest round of updates.  Now the script seems to not recognize "note" (see screen shot).  I'm using 10.3.7 on Mojave 10.14.6.

 

Thanks!

Andy

Screen Shot 2020-11-14 at 4.46.02 PM.png

  • Level 5*
Posted
55 minutes ago, apj68 said:

Has anyone else's folder automation suddenly stopped working?  I don't use it everyday so I'm not exactly sure when it happened but I believe sometime after the latest round of updates.  Now the script seems to not recognize "note" (see screen shot).  I'm using 10.3.7 on Mojave 10.14.6.

I merged your post with an ongoing discussion   
You can read the solution above; basically you installed the Version 10 product and it doesn't support scripting yet
You need to install the Legacy product

  • Like 1
  • 3 weeks later...
Posted
On 11/5/2020 at 8:07 AM, DTLow said:

With the "new build" you switched to the Version 10 product
and you're using Applescript, which is not yet supported (hoping for an upcoming update) 

Install Evernote Legacy at https://help.evernote.com/hc/en-us/articles/360052560314?fbclid=IwAR2TNqp-eGRH3Ds8Vfu-CiKPjYolJzZ_keR9eWQaDahJ2GN-7hwn595zI8w&__s=bsetfdgzirbvqtopurph

Your script says    tell application "Evernote"
Two choices   
1. Change the script to  tell application "Evernote Legacy"      
2. Rename the app    EvernoteLegacy.app  >  Evernote.app

THANK YOU!! 

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
×
×
  • Create New...