Application icon

Configuring Buttons on Prompt Statements

The following statements support the configuration of buttons:

Ask
Prompt
Prompt from Container
Prompt for Fields
Prompt for Text

To configure the buttons press the Buttons... button. A panel will be displayed where you an configure up to four buttons. Close the panel by clicking off the panel or by pressing the Escape key.

Each button has a text field where a title can be specified and a control to select the button type. Not all button types are available for each of the above statements. Four buttons are available numbered from 1 to 4. Depending on how the panel is being displayed, the buttons are placed right to left or top to bottom.

If you leave a button field blank a default name will be supplied. Button names can contain escape sequences. If a button name contains an escape sequence and it resolves to be visually empty, the button is not displayed.

At least one button must be defined. If at runtime, due to escape sequences, no buttons are defined, a Cancel button is supplied.

At runtime whenever a prompt panel closes a Prompt Chosen Button named variable is set to the number of the selected button.

You can optionally also allow for the display of a help button. When the help button is enabled, named variable Prompt Help Button URL will be examined. The contents of the named variable must have one of the following prefixes or the button will not be displayed:

http
An attempt will be made to open a URL in the browser.

?
An attempt will be made to open a URL based on one of the special ? forms supported by the Open URL statement. This form is designed to be used with actions supplied on the resource web page.

<m>
A resizable popup help panel will be displayed with the contents of the named variable. Common markup sequences are supported. The displayed window supports Font>Bigger and Font>Smaller.

The help button has no programmatic interaction with an action. A web page or help panel is successfully displayed, or not. Holding down the Option key when clicking on the help button will display the resource documentation, if any.

The following button types may be available:

---
An unassigned button. ie. it will not be displayed.

Continue
A button which simply closes the panel. If the title field is empty it will be named Continue.

Cancel
A button which cancels the executing action or the batch processor. If the title field is empty it will be named Cancel Action or Cancel Batch. Unless you have suppressed it a warning will be displayed. This button can be activated by the Escape key.

Copy
The displayed text is copied to the system clipboard. If the title field is empty it will be named Copy. The panel remains open.

Copy-Cancel
The displayed text is copied to the system clipboard and then the executing action or the batch processor is cancelled. Unless you have suppressed it a warning will be displayed. If the title field is empty it will be named Copy.

Copy-Continue
The displayed text is copied to the system clipboard and then the panel is closed. Action execution continues. If the title field is empty it will be named Copy.

Copy-Continue-False
Same as Copy-Cancel and the action test state is set to false. Unless you have suppressed it a warning will be displayed. If the title field is empty it will be named Copy.

Copy-Continue-True
Same as Copy-Cancel and the action test state is set to true. Unless you have suppressed it a warning will be displayed. If the title field is empty it will be named Copy.

Exit
This is only available on the Prompt for Fields, Prompt for Text and Prompt from Container statements. The panel is closed without validating the optional formatting requirements.

False
The panel is closed and the action test state is set to false. If the button's title field is empty the button will copy the title from the Settings - Actions False setting. If that is empty, the button will be named False.

Menu
The button displays a menu. See Prompt Menu Formatting for information on how to construct the menu. When a menu item is selected and closes the Action Pending Window, named variable Prompt Menu Item Reference will be set appropriately. The menu is defined in named variable Prompt Button # Menu, where # is the button's number. If the named variable does not describe a valid menu at runtime, the Menu button will be hidden.

Multi Line Editor
This is only available with the Prompt for Text statement. when pressed you will be able to enter text in a multi line editor. The button does not close the panel. Depending on the configuration settings of the statement, the button may be hidden. If the title field is empty it will be named Multi Line Editor.

True
The panel is closed and the action test state is set to true. If the button's title field is empty the button will copy the title from the Settings - Actions True setting. If that is empty, the button will be named True.

You can designate that a button should be segmented. When a button is segmented it has a title at the left and a disclosure control at the right which displays a popup menu. The menu displayed is the same as if the button type was Menu. This allows you to have a button which performs a function and optionally displays a menu. Buttons which have a button type of Menu will never show the disclosure control. The menu is defined as with the Menu button type. At runtime, segmented will be ignored if the button type is Menu or if the menu is not defined.

When the Action Pending Window is dismissed, the Prompt Chosen Button named variable is always set to the number of the button which closed the window. Additionally, if the window was closed via a menu item, the Prompt Menu Item Reference named variable will contain a reference to the menu item, otherwise it will contain -1.

You can override Yate's automatic determination of which button is the default. The default button is initially highlighted and can be activated by the Return key. The default button is determined at runtime by the integer value in named variable Prompt Default Button. Historically this named variable had to be manually set. Starting in Yate v6.6 the default button can be configured in this panel. At runtime the named variable is set accordingly. The possible choices are:

---
No changes to the Prompt Default Button named variable are made at runtime.

None
The named variable is set to -1. There is no default button.

Default
The named variable is set to 0. Yate chooses which button is the default, if any. Note that this value is in effect when the named variable is manually set to empty or a non integer value.

1, 2, 3, 4
Assuming that the specified button is displayed, it will be the default button.

any other value
No default button.

Note that segmented buttons cannot be the default button.

When one of the above statements has a Cancel button which is clicked, a warning may be issued. If a Cancel button is clicked a warning is initially displayed. If you enable Do not show this message again, further Cancel warnings will not be displayed until the next time Yate is started.

The warning mode is determined at runtime by the integer value in named variable Prompt Cancel Warning. Historically this named variable had to be manually set. Starting in Yate v6.6 the cancel mode can be configured in this panel. At runtime the named variable is set accordingly. The possible choices are:

---
No changes to the Prompt Cancel Warning named variable are made at runtime.

Default
The named variable is set to 0. The current state of the default mode is restored. (Show unless Do not show this message again was enabled). Note that this value is in effect when the named variable is manually set to empty or a non integer value.

No Warning
The named variable is set to -1. No warning will be issued.

Warning
The named variable is set to 1. A warning will be issued.

Exit
A warning is always issued. If the user elects to cancel, the action will not be cancelled! The panel will be dismissed and the Prompt Chosen Button named variable will be set to -1000. This provides a means of issuing a cancel warning but being able to provide post processing.

Note that in order to reduce the dependency on named variables, newly created prompt statements will enable all settings to their default values. This means that Prompt Default Button and Prompt Cancel Warning will be set to Default.



Button Warnings

The text [cancels] will appear after the statement's name if all the following conditions holds:

Note that this is not an error. It is just a visual reminder that the statement more than likely always cancels the action.

Ask statements can also be followed by [no true], [no false] or [no true or false] text. Note that this is not an error. It is just a visual reminder that the statement is missing one or more of the test state setting buttons.




Advanced Prompt Statement Functionality