Jump to content
wlmorin

mac AppleScript Gone Bad

Recommended Posts

I'v been using a simple AppleScript that I use with Hazel for awhile now and just recently started getting an error. The script I use is:

 

 

 

tell application "Evernote"


    activate


    create note from file theFile


end tell

 

 

 

When I go to compile it, the word "note" is highlighted and I get the error message below:

 

 

The error message that I'm receiving is: "Expected end of line, etc. but found application constant or consideration"

 

 

 

Any assistance will be appreciated 

Share this post


Link to post

I'm having the same issue. I got around it once, seemingly by opening and closing the evernote app several times. But it's pretty odd if that actually is what fixed it. Anyway, I've got the same problem again. "Expected end of line... "

Share this post


Link to post

When developing your AppleScript, you should usually have EverNote open for the compilation step.  I've had similar issues writing AppleScript for other applications.  This is especially true for Evernote, since if Evernote is closed and the EvernoteHelper is opened, the editor will change the application name to EvernoteHelper and really confuse you.  ;-)

 

Once the script is compiled, the activate command will actually open Evernote if it is not already open.  It's just for compilation that you have to open Evernote before hand.

Share this post


Link to post

Just call Evernote more specifically by putting your Tell to:

tell application "Evernote.app"(* Your code here *)end tell

Share this post


Link to post

See if this is fixed in our latest version and let me know. Thanks for reporting it!

Share this post


Link to post

×
×
  • Create New...