ZenoTest
ZenoTest — Windows Desktop UI Testautomatisierung für Qt, WPF, WinForms & native Apps. Aufzeichnen, skripten und automatisierte GUI-Tests mit CI/CD-Integration ausführen.

#define

Description
The #define directive defines a named constant or text substitution (macro) that is replaced throughout the script before execution.
It works similarly to the C preprocessor: every occurrence of the defined name in the code is replaced with the specified value before parsing.
#define directives are processed at the very beginning, before any other interpretation takes place.

Syntax
#define NAME value

Rules
- NAME must be a valid identifier (letters, digits, underscores; must not start with a digit).
- value is optional. If omitted, the name is replaced with an empty string.
- Replacements are word-boundary aware: only whole identifiers are replaced, not partial matches inside other identifiers.
- Replacements do not occur inside string literals or comments.
- A #define line is not visible to the parser and does not affect line numbering.

Example
#define MAX_RETRIES 5
#define LOGIN_BTN "BTN_LOGIN"
#define TIMEOUT 30000

void main()
{
         StartAUT(TIMEOUT);

    int retries = 0;
    while (retries < MAX_RETRIES)
    {
        LeftMouseClick(LOGIN_BTN);
        retries++;
    }
}
#define #include abs Array ceil CloseAUT Console mode do...while DoubleClick DragAndDrop Execute Fail File floor for Format GetAUTFileVersion GetAUTProductVersion GetAUTQtVersion GetAUTSuspectedCompiler GetAUTSuspectedFramework GetClipboard GetCurrentDate GetCurrentTime GetCurrentWorkingDir GetEnv GetName GetProcessID GetProcessIDHandle GetQtProperty GetText GetTimestamp GetValue Handle HasFocus IsAUT64Bit IsChecked IsEnabled IsVisible LeftMouseClick LeftMouseDown LeftMouseUp max MiddleMouseClick MiddleMouseDown MiddleMouseUp min MouseMove MouseWheel Pass pow Predefined Constants Print rand Regex RegexMatch RightMouseClick RightMouseDown RightMouseUp round Script Language SendKeys SendMessage SetClipboard SetFocus SetGlobal SetQtProperty ShellProcess Sleep sqrt srand StartAUT string TerminateProcess TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEmpty VerifyEndsWith VerifyEqual VerifyExists VerifyFalse VerifyGreater VerifyGreaterEqual VerifyLess VerifyLessEqual VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith VerifyTrue WaitForControl WaitUntilEnabled WaitUntilVisible while