Mac OS 8.5 Technote: Part LXIV

Copyright 1998 by Apple Computer, Inc. All Rights Reserved.

[Previous Section] [Mac OS 8.5 Contents Page] [Next Section]

System Extensions (Continued)

AppleScript 1.3.2

AppleScript is a component of the operating system that provides a scripting interface for users to automate actions that would normally require use of the menus and keyboard. Even more importantly, it allows users to access functionality of applications which would be difficult or impossible to access by hand.
  • AppleScript is now PowerPC-native. Raw AppleScript execution is up to five times faster as compared to the same script run under Mac OS 8.1.

  • Unit Types and Coercions (built-in)

    This version introduces the concept of units of measurement and some basic units. Applications or scripting additions can extend these easily. The types defined include:

    • length
    • area
    • volume (liquid and solid)
    • temperature

    A complete list of specific types can be found in the Help Center in the AppleScript section. (Note: the Help Center claims AppleScript has support for quarts; this is not the case.) Constants can be found in <ASRegistry.h>.

    The basic manner of use in AppleScript scripts is by coercion, e.g. "5 as inches". A value of one class can be coerced into another similar class, such as "5 as feet as inches", so long as both classes share a common unit type (in this case, length, whose base unit is meters).

    To compile the displayed results of a command that returns a unit-type value, a global Get Data handler has been added to resolve the unit type object specifier and coerce it to a value.

  • Unicode Types and Coercions (built-in)

    This version introduces the type Unicode text. Its basic structure is a stream of Unicode text. It can be coerced to and from the normal typeText, typeStyledText, and typeIntlText.

  • Consolidated Scripting Additions

    The following scripting additions, which previously were delivered as separate files in previous versions of Mac OS, have been consolidated into the "Standard Additions" scripting addition:

    • AGStart
    • Beep
    • Choose Application
    • Choose File
    • Current Date
    • Display Dialog (now allows you to specify a timeout)
    • File Commands
    • Load Script
    • Numerics
    • String Commands
    • Read/Write Commands
    • Run Script
    • Store Script
    • Time To GMT

COMPATIBILITY NOTE
The interface and functionality of the consolidated scripting additions listed above is unchanged from AppleScript 1.1.2.

[Previous Section] [Mac OS 8.5 Contents Page] [Next Section]

To contact us, please use the Contact Us page.