Important: The information in this document is obsolete and should not be used for new development.
Built-in Event Functions
Guide Maker provides the following built-in event functions:DoScript
,GoPanel
,LaunchNewSequence
,LaunchNewSequenceNewWindow
,PlaySound
,StartTopicOops
, andQuitTopicOops
.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.
You can specify an event function when using the following commands: <Standard Button>, <3D Button>, <Define Nav Button>, <Hot Text>, <Hot Rectangle>, <Hot Object>, <On Panel Create>, <On Panel Destroy>, <On Panel Show>, and <On Panel Hide>.
The built-in event functions and their parameters are described here.
DoScript(scriptResource)
- scriptResource
- A resource ID of a
'scpt'
resource previously specified in a <Resource> command or the filename of a compiled script that resides in the same folder as the help source files. Apple Guide runs the referenced script when it invokes theDoScript
event function. TheDoScript
event function can also be accessed using the nameDoAppleScript
.GoPanel(panelNumber)
- panelNumber
- A panel number identifying a panel in a sequence. Panels are numbered beginning with 1 for the first panel in a sequence, 2 for the second panel, and so on. Apple Guide displays the panel.
LaunchNewSequence(sequenceName)
- sequenceName
- A text string specifying the sequence to launch. Apple Guide closes the current topic, if any, and continues with the named sequence. Calling this event function closes the current access window or panel and opens a new one. The guide file of the target application must already be open before calling this event function.
LaunchNewSequenceNewWindow(sequenceName)
- sequenceName
- A text string specifying the sequence to launch. Apple Guide does not close the current topic but instead opens a new window. The guide file of the target application must already be open before calling this event function.
PlaySound(soundResource)
- soundResource
- A resource ID or resource name of a
'snd '
resource previously specified in a <Resource> command, or the filename of a System 7 sound file that is in the same folder as your help source files. Apple Guide plays the sound resource asynchronously when it invokes thePlaySound
event function.StartTopicOops(sequenceName)
- sequenceName
- A text string specifying the Oops sequence to launch. Apple Guide hides the current topic and opens the Oops sequence in a new window. The guide file of the target application must already be open before calling this event function.
QuitTopicOops( [panelNumber] )
- panelNumber
- A panel number identifying a panel in a sequence. Panels are numbered beginning with 1 for the first panel in a sequence, 2 for the second panel, and so on. The panelNumber parameter is optional. If it is provided, Apple Guide closes the Oops topic and returns to the specified panel. If it is omitted, Apple Guide closes the Oops topic and returns to the parent topic.