• 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
AppleScript formatting can help with understanding script problems (was Re: For some strange reason)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript formatting can help with understanding script problems (was Re: For some strange reason)


  • Subject: AppleScript formatting can help with understanding script problems (was Re: For some strange reason)
  • From: Chris Page <email@hidden>
  • Date: Fri, 03 Jun 2011 05:51:18 -0700

On May 20, 2011, at 12:31 AM, Ronald Hofmann wrote:

For some strange reason this is not working:

set myVar to "hello"
set theResult to upper case myVar

I'd just like to point out that this is an example of why I added more formatting categories in Snow Leopard, to make it easier to understand where terms are coming from and how they're being parsed by AppleScript: "upper case" is in light blue, italics, which (when using the default formatting styles) tells you that it's a class name. Therefore "upper case myVar" is an object specifier, not a command.

On May 20, 2011, at 4:24 AM, Robert Poland wrote:

set myVar to "hello"
set theResult to uppercase myVar

And here you can see that "uppercase" is a command (because it's bold and blue), and you can tell that it's from a scripting addition because it's dark blue. (Yes, the difference between dark blue and light blue may not be obvious to everyone at first glance, depending on your display, color calibration and eyesight, but once you know it's there, it's generally not difficult to spot when it matters to you. And you can always customize the styles to differentiate them more if you wish.)

-- 
Chris Page

 The other, other AppleScript Chris

 _______________________________________________
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

  • Prev by Date: Re: afplay
  • Next by Date: Re: afplay
  • Previous by thread: Re: For some strange reason
  • Next by thread: Re: Load Script
  • Index(es):
    • Date
    • Thread