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
|