Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter FiveGeneral Functions (continued)

AdminYesNoBox Function

Overview

The AdminYesNoBox function displays a message box with the “Yes” and “No” buttons or queries via the default console. The difference between AdminYesNoBox and YesNoBox is the “Yes” button is replaced with a admin icon.

Syntax/Parameters

Syntax

int = AdminYesNoBox ( [int type], string message, [parameters ... ] );

Parameters

type

An optional int containing an icon type. This parameter can also contain a char value that resolves to an integer. The permissible values are:

  'I' MB_INFO Information
  'N' MB_NONE  None (no icon)
  'Q' MB_QUESTION Question
  'S' MB_STOP Stop
  'X' MB_EXCLAMATION Exclamation

 

The parameter selection does not change the buttons presented and type is not case-sensitive. See Message Box introduction for more information.

message

A string to display. If additional parameters are present, message is considered a formatted string. See Section 5.2 String Functions for more information on formatted strings.

parameters

Zero or more parameters to be formatted and inserted into message. If no parameters are supplied, message is simply passed through to the result string.

Return Value

Returns an int value as a formatted error code or a standard Windows ID code: IDCANCEL, IDYES or IDNO.

Remarks

This function can be used as part of a system change, install or delete action that requires elevate privilege. It doe not change the process, only asks the user for permission to do so.

Do not call the AdminYesNoBox function from background threads or the command line; it returns automatically without displaying the dialog. The AdminYesNoBox function supports a maximum of 4096 characters.

The AdminYesNoBox function permits the usage of a formatted string to display information. Formatted strings allow numeric and other data to be formatted into a string for appropriate display. The format of the string and the data to be inserted depend upon the structure of the message parameter and the contents of the additional parameters passed to the function. For more information on formatted strings, see Formatted Strings in Section 5.2 String Functions.

Message boxes with a query cannot be opened by scripts running in the background.

When running a console version of Legato, the message is dumped to the standard console output unless specifically overridden by the UseMessageBoxes function. The query is performed from console input.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic