Jump to content
  • 0

AppleScript Gone Bad


wlmorin

Idea

Posted

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 

6 replies to this idea

Recommended Posts

Posted

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... "

Posted

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.

Posted

Just call Evernote more specifically by putting your Tell to:

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...