Miscellaneous Functions
The functions listed below are useful for many different purposes.
All of the functions below are non-class functions. Most were defined 10 to 20 years ago, before Mira adopted new rules for using upper and lower case in names. The older function names use mixed case, as do class names and class members. All new function names use purely lower-case names.
Returns a shorter name that removes the middle folders from a file path name. |
|
Exits the script with an optional message if a condition or value fails, with a result of 0, false, or nil. |
|
Issues a default "beep" sound from the computer. |
|
Returns the string "true" or "false" for a boolean value. |
|
Exists the script immediately with an optional message. |
|
Opens a file and returns a CFile class object for accessing it. |
|
Returns a lua table containing the names of files in a folder. |
|
Opens the Windows File > Open dialog to browse for a file name string. |
|
Returns the name of a folder selected using a File > Open dialog. |
|
Returns the current title used for Open dialogs. |
|
Returns the current title used for Save As dialogs. |
|
Returns the state of a Windows virtual key. Use this function to poll the status of keyboard keys and mouse buttons. |
|
Sets a replacement value for math errors. |
|
Returns the math error value as a string. |
|
Returns the width and height of the interior of the main Mira window. |
|
Converts a numeric pixel type code to a string. |
|
Returns the width and height of the interior of the main Mira window. |
|
Changes the title of all subsequent File > Open dialogs. |
|
Changes the title of all subsequent File > Save As dialogs. |
|
Returns the pixel type number corresponding to the pixel type name. |
|
Sets default parameters for resampling images. This is used by |
|
Converts a string pixel type to a numeric pixel type code. |
Contents, Date, Time, and Angle Functions, Plotting Functions, Script Classes, Table and Array Functions, Text Formatting Functions
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.