Insert Method

Description

Inserts a Command object in the Commands collection.

Syntax

agent.Characters ("CharacterID").Commands.Insert Name, RefName, Before, _
Caption, Voice, Enabled, Visible

Part Description
Name Required. A string value corresponding to the ID you assign to the Command.
RefName Required. A string value corresponding to the name (ID) of the command just above or below where you want to insert the new command.
Before Optional. A Boolean value indicating whether to insert the new command before the command specified by RefName.

True    (Default). The new command will be inserted before the referenced command.

False    The new command will be inserted after the referenced command.

Caption Optional. A string value corresponding to the name that will appear in the character's pop-up menu and in the Commands Window when the client application is input-active. For more information, see the Command object's Caption property.
Voice Optional. A string value corresponding to the words or phrase to be used by the speech engine for recognizing this command. For more information on formatting alternatives for the string, see the Command object's Voice property.
Enabled Optional. A Boolean value indicating whether the command is enabled. The default value is True. For more information, see the Command object's Enabled property.
Visible Optional. A Boolean value indicating whether the command is visible in the Commands Window when the client application is input-active. The default value is True. For more information, see the Command object's Visible property.

Remarks

The value of a Command object's Name property must be unique within its Commands collection. You must remove a Command before you can create a new Command with the same Name property setting. Attempting to create a Command with a Name property that already exists raises an error.

See Also

Add method, Remove method, RemoveAll method

--------------------------------------------------------