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 Descriptions
/ Creating Coachmarks


<Define AppleScript Coach>

You can use the <Define AppleScript Coach> command to define a coachmark that uses an AppleScript script to determine the object to mark.

<Define AppleScript Coach> coachMarkName [, coachStyle]
                           , AppleScriptID
coachMarkName
A text string specifying the name of this AppleScript coach.
coachStyle
A value that indicates the coach style to use for the item. You specify how Apple Guide should draw the coachmark for the item using a constant or red arrow specifier:
Constant

REDCIRCLE, REDUNDERLINE, or GREENX
Red arrow specifier
RedArrow(start, end)
Use the RedArrow function to draw a red arrow beginning at a location specified by start and ending at a location specified by end. The values for start and end are integers 1 through 8, where each value indicates a general location in a rectangle:
LocationValue
Top left1
Top center2
Top right3
Middle right4
Bottom right5
Bottom center6
Bottom left7
Middle left8
These values indicate the eight possible points for the start and end of the arrow.
The coachStyle parameter is optional. If you omit this parameter, Apple Guide uses REDCIRCLE as the default.
AppleScriptID
The resource ID of a script or the name of a script file. You can specify a filename in the same folder as your source files or you can specify the file and its pathname, relative to the folder containing Guide Maker (for example, ":My Scripts:Some Coach Script"). The script that you specify should return a rectangle identifying the location for the coachmark.
DESCRIPTION
The <Define AppleScript Coach> command defines an AppleScript coach. You associate an AppleScript coach with a particular panel using the <Coach Mark> command. When Apple Guide opens a panel that includes a <Coach Mark> command naming a defined AppleScript coach, Apple Guide executes the specified script. Once the script returns a rectangle for the object, Apple Guide draws the coachmark.

If you specify a script by resource ID, you must make it available to Guide Maker by using a <Resource> command.

SPECIAL CONSIDERATIONS
If AppleScript is not installed on the user's system, Apple Guide does not attempt to execute the script and thus no coachmark will be drawn.

EXAMPLES
#define an AppleScript coach 
<Define AppleScript Coach> "PageNumber", REDCIRCLE, \xAC
                     ":My Scripts:Find Rect for PageNo"
<Define Panel> "page number info"
   <Coach Mark> "PageNumber"
<End Panel> 
SEE ALSO
The <Coach Mark> command is described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996