¬¬ ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬«

¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬«



nn

8.69.3 Parameter

TGT

This is the keyword to define a new rule (pattern).

target

Specifies the rule (pattern) to react on. The target is a regular expression pattern
which is matched against the text of the messages that Hercules issues.

CMD

This is the keyword to specify a command for a previously defined rule.

consolecmd

Specifies the command to be executed if a target rule matches. The associated
command must be a valid Hercules console command.

LIST

List all rules/commands or list only rule/command at index nn.

DEL

Delete rule and command at index nn.

nn

Number of the index to be listed or deleted.

CLEAR

Specifies to delete all defined rules. This stops the Automatic Operator.

8.69.4 Examples

Example 1:

Define target rule: Check for message HHC01600E ("Unknown Hercules command").

HHC00013I Herc command: 'hao tgt hhc01600e'

HHC00077I The 'target' was placed at index 0

Figure 138: HAO command (define target rule).

Example 2:

Define command for target rule: Issue "?" command (List all valid commands).

HHC00013I Herc command: 'hao cmd help'

HHC00077I The 'command' was placed at index 0

Figure 139: HAO command (define command)

Example 3:

List all defined rules.

HHC00013I Herc command: 'hao list'

HHC00087I The defined Hercules Automatic Operator rule(s) are:

HHC00088I Index 00: target 'hhc01600e' -> command 'help'

HHC00082I 1 rule(s) displayed

Figure 140: HAO command (list defined rules)

Example 4:

Delete rule at index 0.

HHC00013I Herc command: 'hao del 0'

HHC00086I Rule at index 0 successfully deleted

Figure 141: HAO command (delete rule)

Example 5:

Delete all rules (stop Hercules Automatic Operator).

HHC00013I Herc command: 'hao clear'

HHC00080I All HAO rules are cleared

Figure 142: HAO command (delete all rules)

Example 6:

Sample of automatic execution of a command (triggered via the use of an unknown console command, as
defined in examples 1 and 2).

HHC00013I Herc command: 'offload'

HHC01600E Unknown herc command 'offload', enter 'help' for a list of valid commands

HHC00007I Previous message from function ProcessPanelCommand() at cmdtab.c[286]

HHC00081I Match at index 00, executing command 'help'

HHC00013I Herc command: 'help'

HHC01602I Command Description

HHC01602I ------- -----------------------------------------------

HHC01602I help list all commands / command specific help

HHC01602I ? alias for help

HHC01602I cmdlevel Display/Set current command group

HHC01602I cmdlvl Alias for cmdlevel

.

.

.

Figure 143: HAO fired command

Previous Page Next Page