Wprintf
The global Wprintf function writes formatted text in a specified text editor window. A reference to the text window is passed as the first function argument. This method provides functionality like the printf function in the C language. The Printf function is similar except that Printf uses the default Script Messages window. The name of the present function means "window printf".
bOK = Wprintf( CTextView, sFmt, ... ) |
CTextView is a reference to an existing text window.
sFmt is a format string.
... refers to an optional list of arguments (see Remarks).
On success, this method returns true.
On failure, this method returns false.
Wprintf takes 2 or more arguments. The first argument is a reference to a CTextView object that was created using the CreateTextWindow function or another function. The second argument is a string that may be either the value to print or a format to be used for interpreting any additional arguments. Additional arguments provide values for the % fields embedded in the format string. After the first argument, the syntax used by this function is compatible with the printf function in C; for details about specifying the format string, refer to documentation for printf in the C or C++ language.
The script below writes formatted text to the Script Messages window using the Wprintf method:
|
-- create a text output window |
|
-- values to print |
|
-- do a formatted print to T |
Printf, CTextView:Printf, CreateTextWindow, Sprintf
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.