Command: ifno

Syntax

ifno <message>
    <command_block>

Description

Prompt the operator for a yes/no answer via a dynamic menu.

Parameters

Switches

Notes

A question mark ( ? ) will be automatically added to the prompt.

The command or command block on the line following the ifno command will be executed if a No answer was given by the operator. This may be followed by an else statement which will be executed if a Yes answer was given.

When used in conjunction with master menus (-m), the selection of a master menu command resulting in an abort of the pop-up will skip execution of the <command_block> associated with this command and any accompanying else statement.

Examples

Single command execution on answering No. Note the semi-colon to indicate a new line.

ifno 'OK so far'; return

Command block execution.

ifno 'Do you wish to exit', -n; !Continuing
else {
    exec tidyup
    return
}

See Also

Commands:

if, ifyes, else, interrupt, poll, return, unless