Command Confirmation

From VoxCommando
Revision as of 12:24, 13 January 2021 by James (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Command confirmation

Confirm LCB.png

Any command can be set to require confirmation. For example, if you have a command to delete a file, or a command to shut down Windows, to be safe you may want to require confirmation so that the command is not triggered by accident. Commands can be set to require confirmation in the LCB (Logical Command Builder). See the image at right. By default, most commands do not require confirmation.

Specifying that a command requires confirmation

When editing the command settings and macro in the LCB, place a check mark in the "Must Confirm" checkbox. This tells VoxCommando that when this command is requested by either a voice command or by an event, VoxCommando should not actually execute the command immediately. It will wait for the user to confirm that they really want to run the command. If specified in options, VoxCommando will show an OSD message to let the user know that confirmation is required.

Why use command confirmation?

  • The most obvious reason to require command confirmation is to be certain that the user really wants to execute a command before doing something that is potentially destructive (e.g. deleting a file) or before doing something that would be annoying if executed by accident (such as turning off all the lights, putting the computer to sleep etc).
  • Another reason would be to create a bit of a conversational feel. For example VoxCommando might suggest something to the user as a followup to another command and the user can either say "yes please" or "no thanks".
ConfirmationOptions.png

Prompting the user to confirm a command

The simplest way to let a user know that a command requires confirmation is by configuring options.

On the "General" tab of the options window select check the box labelled "Show OSD when confirmation required" as shown in the image.

Above this you can also specify what phrases you would like to use to either confirm or cancel the execution of the command.

If you prefer to create your own command to alert the user of the fact that a command needs confirmation you can use events to execute a custom command.

If you prefer to create your own voice commands to confirm or cancel the command you can do this using normal voice commands that use the actions:

Using the events generated by commands that require confirmation

ConfirmHistory.png

When a command is initated that requires confirmation, VoxCommando will automatically generate an event named: Confirm.*** where *** will be the name of the command that requires confirmation.

When the command is cancelled (either because of a timeout or by telling VC to cancel it another event will be generated: Confirm.Cancel.*** where *** will be the name of the command that requires confirmation.

  • If you want to automatically trigger a command but still require confirmation, you can use VC.TellVox instead of an event.

It is not recommended that you "chain" confirmation commands. Unless these commands are threaded, only the first command will execute. Confirmation was not created to be used primarily as a "chitchat feature." It's main purpose is to prevent critical commands from being executed accidentally. That said, see forum for some workarounds.

    • Apart from the default confirmation behaviour specified in the Options settings, you can also create a specific confirmation command, as well as use special actions within a command to manage confirmation behaviour. (See James's "Coming Home From Work" example on the forum.)