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
/ Specifying Events

<Define Event List>

You can use the <Define Event List> command to specify a sequence of events (an event list). You can use an event list as a parameter for the <Standard Button>, <3D Button>, <Define Nav Button>, and <On Panel Create> commands.

<Define Event List> eventListName, event1 [, event2] [, event3]     
                     [, event4] [, event5] [, event6]
A text string specifying the name of this event list.
A name of an event function. Include any parameters expected by the function in parentheses following its name.
event2 -event6
The parameters event2 through event6 can each specify the name of an event function (and any parameters expected by the function in parentheses following its name). These parameters are optional.
The <Define Event List> command specifies one or more event functions. You typically associate an event list with another button-defining command, such as <Standard Button> or <3D Button>. When the user clicks a button, Apple Guide calls the event function or event list associated with that particular button. Event lists are usually used to perform a series of actions, such as sending one or more Apple events to a target application, requesting it to perform various actions.

You can specify up to six event functions in an event list. All events in an event list must be static, that is, they cannot require any parameters from the caller (other than the parameters already provided in the specification of the event in the event list).

Guide Maker provides these built-in event functions: DoScript, GoPanel, LaunchNewSequence, LaunchNewSequenceNewWindow, PlaySound, StartTopicOops, and QuitTopicOops.

Apple Guide also supports a number of other events, defined in the Standard Setup file. If your build file includes the Standard Setup file, then you can specify any of the events defined in that file.

Any event functions specified in parameters event1 through event6 must refer to a event function defined with the <Define Event> command or to one of Guide Maker's built-in event functions.

#an event list specifying a series of event functions
<Define Event List> "ClickAndGo", PlaySound(1000),
                   LaunchNewSequence("My sequence name"),

<Define Panel> "Example Panel"
   <Standard Button> "Create Chapter Index", Point(50,100),
<End Panel>
For information on Guide Maker's built-in event functions, see "Built-in Event Functions" on page 10-188. For information on the <Standard Button> and <3D Button> commands, see page 10-57 and page 10-60, respectively.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996