Name

Apple Guide

Dictionary commands

Animate

If an animation object like a QuickTime movie exists in the open Apple Guide window, then this command is a signal for it to execute its animation. The following is an example of animate :

tell app "Apple Guide" to animate

Your script raises an error if you use this command and the open Apple Guide window does not have an animation.

Close

This command closes all the Apple Guide windows and the running database of help files. But it doesn’t close the Apple Guide program, which is still running invisibly in the background. You can still send the program an Apple event to open another application’s Guide files, for instance. Use Quit if you want to completely quit the Guide program so that it doesn’t use the machine’s memory anymore.

DoCoach

This command draws the coach mark that is defined for the current Apple Guide window, or it has no effect if the current panel has not defined a coach mark. If any of the Topics, Index, or Look For Apple Guide panels are active then this command raises an error.

DoHuh

If the beveled button with the “Huh?” label is active in the lower left corner of the Guide window, then issuing this command is the equivalent of clicking the “Huh?” button:

tell app "Apple Guide" to DoHuh

GoBack

This command closes an “oops” topic and returns to the Guide window that preceded the active oops panel. What’s an oops topic, you ask? When the Apple Guide instructs the user to initiate a command such as File Print and the user moves to the next instructive panel without doing the requested command, then Apple Guide usually displays another panel with the oops label and some text that repeats the instructions.

GoNext

This command moves to the next Apple Guide window.

GoNextUnconditionally

Unlike GoNext, this command goes to the next window regardless of whether the user has followed the previous panel’s instructions.

GoNextToPanel

This command goes to the next numbered panel, as in:

tell app "Apple Guide" to GoNextToPanel PanelNumber 5

Specify the panel number with the PanelNumber labeled parameter. If there is not a panel number 5 (because the active set of Apple Guide windows only has four panels), then Apple Guide ignores the command.

GoNextToFirst

This command goes to the first panel in the Guide sequence.

GoNextToLast

This command goes to the last panel in the Guide sequence.

GoPrevious

This command goes to the window preceding the active Guide panel; it’s the same as clicking the left arrow button in the lower region of an Apple Guide panel.

GoPreviousUnconditionally

This goes to the window preceding the active Guide panel, but doesn’t evaluate any of the help program’s qualifiers such as whether the user followed on-screen instructions. This command has the same effect as clicking the left arrow button in the lower region of an Apple Guide panel.

GoStart

This goes back to the beginning of a help sequence, such as an Apple Guide Topics window.

HidePanel

This minimizes a help window (makes it smaller on the desktop).

ShowPanel

This command expands or maximizes a minimized guide window. The command is ignored if the panel is already maximized.

TogglePanel

If the panel is minimized this command maximizes it, and vice versa. It has the same effect as clicking the zoom box (first control in upper right corner) on the Guide panel.

GoViewIndex

This command goes to the access window’s Index view, which has the same effect as clicking the Index button. If the access window is not open then this command raises an error. The access window is the upper level Guide window. See GoViewLookFor and GoViewTopicAreas.

GoViewLookFor

This command goes to the access window’s Look For view (which is the same as clicking the Look For button). If the access window is not open then this command raises an error. See GoViewIndex and GoViewTopicAreas.

GoViewTopicAreas

This goes to the access window’s Topics view, which also happens when you click the Topics button in the access window. If the access window is not open then this command raises an error. See GoViewIndex and GoViewLookFor.

Open

Use the Open command, followed by a database file-specification labeled parameter, to open a new Apple Guide help system. Save the path to the Guide file in a file specification variable, and then follow the open database syntax with the variable and any of the two optional parameters.

Here’s a syntax example:

tell app "Apple Guide" to open database filespec string "grep"
ViewNumber 4

This command forces a search of the filespec Guide file for the term “grep” and presents the results in a Look For access window. Notice that the target application for the example’s command is “Apple Guide”, not “BBEdit 5.0.” When you use AppleScript, the program’s Guide file is controlled through the Apple Guide application. BBEdit’s dictionary does not identify any Apple events for controlling help files.

OpenPanelOnly

This command opens the presentation window (as opposed to an access view such as Index) associated with the panel id number provided with the panelId labeled parameter. You also have to provide the database labeled parameter with this command if a Guide database isn’t already open.

OpenPanelOnlyAnother

You can open a panel in a new window using this command, as long as a Guide file is already open. In other words, an already opened presentation window will not close as a result of OpenPanelOnlyAnother.

OpenPanelOnlyReplacement

This replaces any existing windows with the presentation window identified with the PanelId labeled parameter. The parameter is required, as shown in the following:

OpenPanelOnlyReplacement PanelId 4

OpenWithSequence

If you know the sequence id of a particular sequence of Guide presentation windows, then you can use this command to test it:

OpenWithSequence Database filespec SequenceID 4

OpenNamedSequence

This is like the previous command, except that you name the sequence with a string, rather than providing a sequence id number. The following is a syntax example:

OpenNamedSequence Database filespec SequenceName "printhlp" PanelNumber 2

OpenWithSequenceAnother

This is designed to display a sequence of panels without closing any existing windows, but a Guide file or database must already be open.

OpenWithSequenceOops

This command initiates a new sequence of panels in an open Guide window, hiding but not closing the original window. A GoBack command returns the user to the prior window. The particular Guide database must already be open.

OpenWithSequenceReplacement

This closes any existing access or presentation windows and starts a new sequence in another presentation window. A syntax example is:

OpenWithSequenceReplacement SequenceID 1 PanelId 2

PlaySound

This sends the open Guide file a PlaySound Apple event and includes the id of the sound data as a labeled parameter:

tell app "Apple Guide" to PlaySound SoundId 4

Quit

This closes any open windows and terminates the Apple Guide app. Unlike close, Quit does not leave Apple Guide silently running in the background, using its megabyte or so of memory.

QuitFront

This is similar to Quit, but it leaves Apple Guide running if there is more than one Guide window open. In other words, QuitFront closes the front Guide window but leaves the next window intact and does not shut down Apple Guide. If only one window is open then QuitFront has the same effect as Quit.