• 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: Missing values and Script Editor request
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing values and Script Editor request


  • Subject: Re: Missing values and Script Editor request
  • From: Christopher Nebel <email@hidden>
  • Date: Wed, 7 Sep 2005 16:59:32 -0700

On Sep 7, 2005, at 2:59 PM, Scott Babcock wrote:

The block comment in AppleScript looks like this:

(* this is a block comment
and it continues until here *)

The annoying thing about AppleScript block comments is that AppleScript is still looking at the content of that block to see if it's syntactically correct. If you have improperly-formed AppleScript code inside the block comment, your script may not compile.

Try compiling this:

(*
set foo to "this
*)

--> Syntax Error / Expected "*)" but found end of script.

What's happening here is that it's trying to let you nest comments. This is a bit tricky, as it requires ignoring things like 'set smiley to "*)"', even when they occur inside a comment. It's therefore trying to break things up into tokens, and falls over when you give it lexical garbage like the example above.



--Chris Nebel AppleScript and Automator Engineering _______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Missing values and Script Editor request
      • From: Dave Balderstone <email@hidden>
References: 
 >Re: Missing values and Script Editor request (From: "Scott Babcock" <email@hidden>)

  • Prev by Date: Re: iTunes 5 scripting - thoughts?
  • Next by Date: Re: NSInternalScriptError
  • Previous by thread: Re: Missing values and Script Editor request
  • Next by thread: Re: Missing values and Script Editor request
  • Index(es):
    • Date
    • Thread