Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Apple Guide Complete / Part 4 - Scripting Guide Files
Chapter 10 - Guide Script Command Reference


Guide Script Command Syntax

A Guide Script command line begins with a command, comment, or text that is part of a text block or panel definition, and is terminated by a carriage return. Any number of blank spaces or tabs can precede a command or comment.

Guide Script commands are named keywords that are enclosed in angle brackets (< >). Command keywords are case-insensitive, although headline-style capitalization is used in this book. Most Guide Script commands are followed by a series of parameters, separated by commas. Parameters must be included on the same line as the Guide Script command; however, with some word processors you can use a soft return (Option-Return) to break parameters across lines when necessary. In this chapter, the character \xAC is used to indicate a line that does not contain a hard return; you must either wrap these lines or use a soft return, depending on your word processor. You can also include any number of spaces or tabs between parameters to make command lines easier to read.

This chapter describes Guide Script commands in this format:

<Command Name> parameter1, parameter2 [, optionalParameter1]
Here's a specific example:

<Help Menu> itemString, helpType [, helpCmdKey]
In this example, the command <Help Menu> indicates the Guide Script command. (You don't have to use this sequence of uppercase and lowercase characters. For example, you can use <help menu> if you prefer.) Parameters are shown in italicized words following the command name. Brackets ( [] ) are used to show optional parameters. In this example, itemString and helpType are required parameters, and helpCmdKey is an optional parameter.

You can omit optional parameters. If you do so and the optional parameter is followed by another parameter that you do specify, then you must include a comma for each parameter that you omit. For example:

<Define Item Coach> coachMarkName [, targetApp] [, coachStyle]
                     [, targetWindow] , targetItem
                     [, itemRectangle] 
For the <Define Item Coach> command just shown, you must specify the coachMarkName parameter and targetItem parameter, but all other parameters are optional. To specify the coachMarkName and coachStyle and targetItem parameters (omitting the targetApp, targetWindow, and itemRectangle parameters), you could specify the command in this format:

<Define Item Coach> "coachName",, REDCIRCLE,,DialogID(2)
Parameters are one of the following types:

You use the # character to indicate that the text that follows, up to the carriage return, should be treated as a comment. You can start a comment at the beginning or at the end of a command line, for example:

#here's a comment
<App Text> "SurfWriter Guide"    #here's another comment
To use the "#" character as the first character on a line of panel text, use "##". To use the "<" character as the first character on a line of panel text use "<<".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996