• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Damaged scripts "Expected expression but found unknown token"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Damaged scripts "Expected expression but found unknown token"


  • Subject: Re: Damaged scripts "Expected expression but found unknown token"
  • From: Shane Stanley <email@hidden>
  • Date: Wed, 25 Jan 2012 10:42:59 +1100

On 25/01/2012, at 8:23 AM, Stan Cleveland wrote:

> I've seen the same -2741 error on occasion, but only in situations where the script opens, but won't compile. In nearly every case, my problem was with the AppleScript continuation character (¬), which is used when a long line of code is broken into two or more lines. This character's Unicode code point is U+00AC or decimal 172. In my case, it had somehow split into two characters: ASCII 0 (null) and 172 (¬). I suspect this had something to do with botched character encodings. I was able to delete the null characters to fix the problem.

That sounds more like an issue with .applescript files, not compiled files. FWIW, AppleScript Editor recognises UTF8 files without a BOM only as of OS X 10.7.2.
>
> No guarantees, but desperate times call for desperate, if potentially worthless, measures. Perhaps someone with more knowledge of script file formats could say whether this idea has any merit whatsoever.

I'm not sure it will do anything for compiled files, but if it were me, I'd try anything...
>
> To avoid such problems, I've long ago learned to save out a text copy of every script I work on (using the '.applescript' extension).

I keep trying to convince developers that editors should be able to save in a default text format, and just export compiled versions for deployment. Not only would it provide a suitable back-up, but it would also allow easy saving of not-yet-compiled scripts, and therefore provide a way for editors to support Lion-style versions.


--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >Damaged scripts "Expected expression but found unknown token" (From: Eric Geoffroy <email@hidden>)
 >Re: Damaged scripts "Expected expression but found unknown token" (From: Stan Cleveland <email@hidden>)

  • Prev by Date: Re: Damaged scripts "Expected expression but found unknown token"
  • Next by Date: Re: Accessing Mission Control parameters via AppleScript
  • Previous by thread: Re: Slow Applescript Mailing list
  • Next by thread: Re: Damaged scripts "Expected expression but found unknown token"
  • Index(es):
    • Date
    • Thread