Console Log and User Interaction
Function: IsCancellationRequested
Description:Determines if the user has requested a cancellation. It is recommended to be used inside the loops to determine the exit point at the request of the user.
Parameters:
None.
Returns:
- true
if a cancellation was requested.
- false
otherwise.
Usage Example | |
---|---|
Function: Clear
Description:
Clears the console output, removing all text and setting the cursor back to the top-left corner of the console window.
Parameters:
None
Return Value:
None
Usage Example | |
---|---|
Procedure: Print and PrintLine
Description:Prints the specified text to the console. This function not only supports basic text but also handles arrays of strings and tuples for enhanced data visualization. Procedure
PrintLine
is similar to the Print
procedure, but appends a newline character at the end to move the caret to a new line.
Parameters:
- objects
: An array of objects to be printed. This could include text, numbers, arrays of strings, or tuples.
Returns:
None.
Function: SetTextColor
Description:
Changes the text color for console output. The color is specified using an ARGB (Alpha, Red, Green, Blue) string format, starting with a #
sign. To reset the text color to the default, you can pass an empty string or null
.
Parameters:
- argb
: The ARGB string specifying the desired text color. The string should start with a #
sign. Pass an empty string or null
to reset to the default text color.
Return Value:
None
Usage Example | |
---|---|
Function: SelectFromList
Description:Displays a selection list to the user and returns the selected index. Can be used as a choice from a list of values, or as a dialog where more than 1 option is offered.
Parameters:
- message
: The message to display above the list.
- items
: A list of string items for the user to select from.
Returns:
- Index of the selected item, or -1 if cancelled.
Usage Example 1 | |
---|---|
Usage Example 2 | |
---|---|
Function: InputBox
Description:Prompts the user to input a text value.
Parameters:
- message
: The message to display to the user.
- defaultText
: Optional parameter to set the default text value.
Returns:
- User input as a string.
Usage Example 1 | |
---|---|
Usage Example 2 | |
---|---|
Procedure: ShowMsg
Description:Displays a message to the user. Can differentiate between standard messages and error messages.
Parameters:
- message
: The message to be displayed.
- isError
: Optional parameter to specify if the message is an error. Defaults to false
.
Returns:
None.
Function: GetUserName
Description:Retrieves the current user's VCTool login. Can be used to control access to an application at the source code level. Attention: such verification is not allowed in publishing applications.
Parameters:
None.
Returns:
- Name of the current user VCTool login as a string.
Progress panel
Procedure: ShowWorkingPlate
Description:Displays or hides a working plate over the log window to indicate a process in progress. The working plate contains a text field and a progress bar.
Parameters:
- show
: Boolean value determining if the working plate should be shown (true
) or hidden (false
).
Returns:
None.
Usage Example | |
---|---|
Function: InitProgressBar
Description:Initializes a progress bar on the working plate with a specified maximum value.
Parameters:
- maximum
: The maximum value for the progress bar.
Returns:
None.
Function: SetProgressBarValue
Description:Sets the current value of the progress bar.
Parameters:
- value
: The value to which the progress bar should be set.
Returns:
None.
Usage Example | |
---|---|
Function: IncreaseProgressBarValue
Description:Increases the value of the progress bar by a specified step.
Parameters:
- step
: The amount by which the progress bar value should be increased. Default is 1
.
Returns:
None.
Usage Example | |
---|---|
Function: SetWorkingPlateText
Description:Updates the text displayed on the working plate.
Parameters:
- text
: The text to be displayed on the working plate.
Returns:
None.