Application icon

Prompt

The Prompt statement is intended to be used to interact with a running action. You specify a prompt message to be displayed by default in the Action Pending Window. The prompt is only issued once per set of files when run stepwise.

You can configure up to four buttons. See Configuring Buttons on Prompt Statements for more information. Which button was pressed can be determined from the Prompt Chosen Button named variable. There is no requirement for buttons to be contiguous. At runtime when a button configured to be a Menu is clicked and a menu item is selected, the panel is closed and named variable Prompt Menu Item Reference will reference which menu item was selected. The Prompt Menu Formatting topic describes how to format the menus.

You can provide simple markup for the text specifying colours, bold and italic. The markup sequences are described in Common Prompt Markup Functionality. Note that when using markup sequences the colour specified in the colour control is ignored. Further, markup sequences are only parsed when the prompt text is displayed in the Action Pending window.

The supplied prompt string may contain any of the escape sequences described in Escape Sequences. The prompt is a multi line scrolling area.

You can elect to issue a beep with the prompt.

You can optionally display the step information. The step information displays the statement, the name of the file which was being processed and the name of the action and line number which contains the statement.

To some degree you can control when the statement is to be ignored. When Unconditional is displayed, the statement is always executed. When Only if Interactive is displayed, the statement is not executed when running through the batch processor. When Only if Batched is displayed, the statement is only executed when running through the batch processor.

The statement supports additional configurability which is documented in Advanced Prompt Statement Functionality. These settings can be configured by clicking on small button with the gear icon.

The following modes are available:

Standard
As the name implies this is the standard mode of operation. When not batch processing, the Action Pending Window is displayed. When batch processing, the prompt is placed into the log file with the issuing action's information.

UI
When not batch processing, the mode is the same as Standard. When batch processing, the prompt is issued to the UI via the Action Pending Window.

Plain Text
When not batch processing, the mode is the same as Standard. When batch processing, the prompt is placed into the log file without the issuing action's information. The text is written as is without any leading or trailing newline characters added.

Alert
The prompt is issued as a system alert as opposed to via the Action Pending Window. Either the standard OS alert style or Yate's alternate alert style will be used. The Hide info option is effectively enabled. Colour settings are ignored and markup is not parsed. The default title is Yate. Special considerations for this prompt type:
Critical Alert
Same as Alert with the exception that the application icon is displayed as indicating a warning.

Menu
This mode displays a popup menu at the cursor position. The menu formatting is described in the Prompt Menu Formatting topic. The menu is read from the Prompt for Text List named variable.

Popup Window
The prompt (markup supported)is displayed in a popup window centered on the display. When the window is dismissed by clicking off the window or by the escape key, the action will resume.

Status
When performing lengthy operations it may be desirable to display status information. The status information is displayed on the main window's status bar. With the exception of the Ignore if Batched option, all other settings are ignored.

DB Status
When performing lengthy operations it may be desirable to display status information. The status information is by displayed on a database window's status bar. If the named variable Prompt DB Status Path contains the full path of an open database window, the status message will be displayed on that window. Status messages displayed in database windows persist until an action or the batch processor terminates, or a database grab is released or a subsequent Prompt with mode DB Status is called with an empty message. If a database is opened as transient, the status is only removed if a subsequent Prompt with mode DB Status is called with an empty message. With the exception of the Ignore if Batched option, all other settings are ignored.

System Log
This mode will cause the message to be logged to the system log. With the exception of the Ignore if Batched option, all other settings are ignored. These messages can be viewed with the Console application by clicking on your Mac in the sidebar under Devices. Note that the availability of the message in the Console application may depend on whether it was running at the time the message was issued. On Sierra and later, messages intentionally issued by Yate can be viewed by the following command when executed in the Terminal:
    log show --predicate 'process == "Yate" and eventMessage beginswith "(Yate-App)"'

User Log
This mode will cause the message to be logged with a time stamp to a text file. If named variable Prompt User Log Path is empty the message will be logged to ~/Library/Logs/Yate-User.log. If named variable Prompt User Log Path is not empty, it must contain a valid path to a file. The file will be created if it does not exist. With the exception of the Ignore if Batched option, all other settings are ignored. When the default location is used the messages can be viewed with the Console application in the Log Reports sidebar item. Note that the logged messages persist until a Prompt statement with a Flush User Log mode is executed.

Flush User Log
This mode will delete the file as specified or implied in the User Log mode. The file will be recreated whenever a Prompt statement with a User Log mode is issued.

Reset
Many action statements which fall in the Prompt category use named variables for additional configuration purposes. If you select the Reset mode, all Prompt configuration named variables except Prompt Title will be reset. All other settings in the statement are ignored and no prompt will be issued. The following is a complete list of the named variables which will be cleared:

Note that all modes except for the following will set or clear (if meaningless) Prompt Chosen Button:

For modes which display a panel, named variable Prompt Chosen Button will describe the reson for the panel's closing. See Prompt Chosen Button Values for additional information.