TITLE
    AppleScript Update 1.4.3 Document and Software
Article ID:
Created:
Modified:
88018
6/12/00
2/28/01

TOPIC

    This article comprises the Read Me for AppleScrip Update 1.4.3 and software download links.


DISCUSSION
    Language/OS Required Release Date Version Read Me Software
    North American English
    North American English Mac OS 9
    2000-05-18 1.4.3
    956 K
    International English
    International English Mac OS 9
    2000-07-19 1.4.3
    956 K
    français
    French Mac OS 9
    2000-05-23 1.4.3
    969 K
    Deutsche
    German Mac OS 9
    2000-05-23 1.4.3
    975 K
    Español
    ---
    --- ---
    Italiano
    ---
    --- ---
    Nederlands
    ---
    --- ---
    Japanese
    Japanese Mac OS 9
    2000-05-23 1.4.3
    946 K


    Earlier versions of this software may be available at http://download.info.apple.com/ .

    Downloading Help: Article 75098 " Help: Downloading Software "

    All software available from this site is covered by a software license agreement included with this software.



    North American English

    About AppleScript Update

    This document describes the specific fixes in this AppleScript Update. We have also included the content from the original Read Me that describes the AppleScript software, tells you where to find information on using AppleScript, and lists the new features of AppleScript that originally shipped with Mac OS 9.

    What is fixed in this AppleScript Update?

    There were three issues fixed with this AppleScript Update:


      1. The performance of the AppleScript Script Editor could be adversely affected by an interaction with Carbon Lib 1.02.

      2. The computer would stop responding when attempting to compile scripts simultaneously.

      3. Inability of Standard Additions "mount volume" command to mount NT, OS X or other non-AppleShare volumes.


    The following information is from the original AppleScript Read Me and it may provide helpful information to those of you who are just starting to use AppleScript.

    What is AppleScript?

    AppleScript is software that allows you to automate tasks on your computer. For example, you can write an AppleScript to automatically empty the Trash, or to add an alias to the Apple menu. Using AppleScript's English-like commands, you describe the task, then save it as a "script" file. For more information, see AppleScript Help in the Finder's Help menu.

    How AppleScript works

    When you tell your computer to do a task by choosing a menu command, for example, the operating system and applications on your computer talk to each other using a messaging tool called Apple events. Apple events transfer information, commands, and requests between applications, networks, and the Mac OS-much like we use phone calls, pagers, or e-mail to communicate with each other.

    When you send an AppleScript message, the operating system converts the script's instructions into Apple events messages, then sends the events to the indicated applications where the instructions are executed.

    How to use AppleScript

    To learn more about AppleScript and how to use it, choose Help Center from the Finder's Help menu, then click on AppleScript Help. AppleScript Help contains an overview of new AppleScript features, as well as background information and instructions on how to use AppleScript. Additionally, the Mac OS CD includes sample scripts and information about AppleScript in a folder named CD Extras.

    You can also find detailed AppleScript information, tutorials, scripts, and links to other resources on the AppleScript Web site: http://www.apple.com/applescript/

    About AppleScript

    The version of AppleScript included with this Mac OS corrects some issues with the previous versions of AppleScript, and also has some added enhancements. For more information on many of these features, see AppleScript Help.

    IMPORTANT : The version of AppleScript included with this version of the Mac OS is designed for use only with this OS version. It is not designed or qualified for use with earlier Mac OS releases (8.6 and earlier).

    NOTE : The former English dialect file is now built into the AppleScript extension.

    AppleScript Help also details all the changes in this version of AppleScript from the previous version shipped with Mac OS 8.6. Some of the new features in this release include:

    Support for IP addressing for Program Linking

    You can now link to remote applications using TCP/IP addressing as well as the traditional AppleTalk addressing. The "machine" object can now accept a URL instead of an AppleTalk machine name. When used in a "Tell" block, this enables you to deliver AppleEvents to remote applications via TCP/IP protocol.

    Previously, remote applications could only be specified using an AppleTalk address consisting of machine name plus an optional zone name, as follows:


      tell application "Finder" of machine "Lab Mac" [of zone "4th Floor"]

    Now you can specify the TCP/IP address of the machine instead of the AppleTalk name and zone:

      tell application "Finder" of machine "eppc://labmac.mycompany.com"

    Note: The URL for a computer has nothing to do with its AppleTalk name, and there is no support for "browsing" a TCP/IP network to look for remote computers. You must know the IP address (for example, 127.200.126.44) or the computer and domain names (for example, labmac.mycompany.com) of the target computer. These can be found in that computer's Web Sharing control panel (turn on Web Sharing and look in the Web Identity panel).

    Support for "Using" Clause

    A new block structure has been included to allow scripts to be compiled without connecting to the actual target application. This is especially useful if the application is unknown at compilation time (for example, the application goes by different names on different computers) or it's awkward to connect to it during script development (for remote applications over TCP/IP, for example). The syntax of the "using terms from" block is as follows:


      using terms from application-object[of computer-object[of zone-object]]
      statement(s) ...
      end using terms from

    Statements inside this block are compiled as if enclosed in a "Tell" block for that application, but their targeting is unaffected; if inside another "Tell" block, that "Tell" block's target is used; if not, the current application is targeted. Blocks for "Tell" and "using terms from" can be nested inside each other.

    This is a more clear substitute for the commonly-used "double tell block" to target unknown applications:


      set the_reply to display dialog "Enter name or URL of remote computer:" default answer ""
      set m to computer (text returned of the_reply)
      tell application "Finder" of m -- Target a remote computer
      using terms from application "Finder" -- but use terminology from local computer's Finder
      set the_list to (name of every process) -- "process" is a Finder-specific term
      end using terms from
      end tell
      set the_application to first item of (choose from list the_list with prompt "Choose an application:")
      tell application the_application of m
      set the_version to version
      end tell
      display dialog "The version of that application is " & (the_version as string)

    Improvements in searching for applications

    When a script with a "Tell application" statement is compiled, AppleScript needs to find the application with the name given. If the application is running, or is a standard double-clickable application, this almost always succeeds; but for certain kinds of applications (system extensions, control panels, etc.) the search sometimes fails and the "Where is application" dialog box is presented. This version of AppleScript automatically searches the System Folder and its enclosed folders for such applications by name, increasing the chances that the application you name will be found without the dialog box.

    About the AppleScript CD Extras folder

    In the CD Extras folder on the Mac OS CD ROM, there is an AppleScript folder containing the following items:

    • OSA Menu Lite: From Lazerware by Leonard Rosenthal, OSA Menu is a system extension. When installed in your Extensions folder, this extension creates a script menu in the upper right portion of the menu bar. You can use this menu to store and launch your compiled AppleScript scripts. OSA Menu is not an Apple product and Apple does not guarantee its use.
    • iDo Script Scheduler: iDo Script Scheduler, from Sophisticated Circuits, Inc., lets you automatically run AppleScripts at any time you choose. You can use it to make your Macintosh perform tasks such as downloading e-mail every morning, or backing up your important data when you're not using your computer. You can use Script Scheduler to create multiple types of repeating events. Each event can run any chosen AppleScript, and it can pass a line of parameters when the script is run. It is especially useful in systems that run unattended, such as servers, store demos, and and information kiosks.
    • Script Sets: These three sets of scripts can be used with OSA Menu: Finder scripts, Universal scripts, and Script Editor scripts.
    • More Folder Actions scripts: This folder contains three additional folder actions scripts.
    • AppleScript Guidebooks: This folder contains contains five informative AppleScript Guidebook modules that provide help and examples that you can install into the Apple Help system.

    Third-party AppleScript products

    Although AppleScript comes with Script Editor, there are a number of third-party tools that can also help you develop AppleScripts:

    • FaceSpan: From DTI (Digital Technology International), dramatically increases the power and usability of your scripts by using the FaceSpan application to create palettes, windows, buttons, lists, and other interface items.
    • Script Debugger: From Late Night Software Ltd., is a powerful and flexible AppleScript authoring tool that lets novices and seasoned script writers get the most from AppleScript. By combining an easy-to-use interface with extensive development tools, it makes script writing faster and easier than ever before.
    • Scripter 2.0: From Main Event Software, Inc., is a popular AppleScript-oriented script authoring, development, and de-bugging tool, adds many new features that make it easy to explore the capabilities of scriptable applications, streamline the creation of scripts, and find potential issues in your scripts.


Document Information
Product Area: Apple Software
Category: AppleScript
Sub Category: General Topics
Keywords: kaswu, kbdload

Copyright © 2000 Apple Computer, Inc. All rights reserved.