Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Odd "End of Line" Syntax Error?

I've got an Applescript that runs fine on one Mavericks machine, but generates an error message on the other:


tell application "Google Chrome" to tell active tab of window 1


That runs perfectly on my 4-year-old iMac running Mavericks. On my new 27" iMac running Mavericks, AppleScript Editor highlights the word "tab" and says:


Expected end of line but found property.


How can I correct this?


Thanks in advance to all for any info.

iMac/MacBook Pro

Posted on Dec 22, 2013 2:56 PM

Reply
16 replies

Dec 25, 2013 1:16 PM in response to Vik_R

Before you reinstall Mavericks, try three things.

  1. With Disk Utility, verify/repair permissions
  2. Select all and move your local ~/Library/Caches contents to Trash (but do not empty the Trash)
  3. Reboot into Safe Boot Mode, empty the Trash, and reboot normally.


Now retry your code in a new AppleScript Editor session. Do not use a template, if you were previously.

Dec 25, 2013 2:30 PM in response to Vik_R

Don't reinstall Mavericks. That's a waste of time and energy for this kind of problem, a bit like replacing the engine block on your car because it backfired once. At worst you may need to reinstall Chrome.


Incidentally, I do not have Google Chrome installed (because... ick!) and I get exactly the same error message you do. that implies either that your installation of Chrome is busted, or that for some reason launch services is not finding Chrome. Make sure you have Chrome open and running and try the script again.

Dec 26, 2013 10:04 AM in response to twtwtw

Okay, I did the following:


  • Repaired permissions with Disk Utility
  • Selected all my user ~/Library/Caches and moved them to trash. Rebooted in safe mode. Deleted them. Rebooted normally.
  • Deleted Chrome by moving the app to trash per Google instructions, and re-installed it.


With Chrome running, I still get the same error message.


I revised the Applescript to call Safari instead of Chrome and got the same error message.


User uploaded file


What could be causing this?

Dec 26, 2013 10:19 AM in response to Vik_R

Do you have any old versions of Chrome on your hard drive? If so, delete them.


after that try resetting the launchservices database. Open terminal and run the following:


/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.fram ework/Support/lsregister -kill -r -domain local -domain system -domain user"

Odd "End of Line" Syntax Error?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.