๐งฉ Variables
Variables in ZeroTrace allow you to store and reuse values, making your scripts more dynamic and organized.
Variables can contain:
- Static values (like
true
,admin
,1234
) - Operators (dynamic data, e.g., random numbers)
- States (system states, e.g., CapsLock on/off)
๐ Variable Syntax Rules
- Declaration always starts with
_$VAR
- Assignment uses
=
and requires quotes around the value - Usage inside strings requires the syntax:
${variable}$
- Dynamic Content: Variables can hold operators (
_$random()
) or states (_@capslockState
)
Valid Usage:
Invalid Usage:
๐ฏ Accessing Variable Values
When you use a variable inside a string ("${variable}$"
), it will:
- Check global variables for a match.
- If the value contains an operator (
_$
), it will execute it dynamically. - If the value contains a state (
_@
), it will check the actual device/system state.
๐ Supported States
Usage inside/between strings are not supported.
State | Description | Output |
---|---|---|
_@capslockState | CapsLock state | ON / OFF |
_@numlockState | NumLock state | ON / OFF |
_@scrolllockState | ScrollLock state | ON / OFF |
_@usbState | USB connection state | ON / OFF |
Valid Usage:
Unsupported Usage:
๐งฉ Practical Examples
Dynamic Delay
Device State Check
Combining Operators and Text
You can nest operators and states inside variables to create powerful dynamic scripts!
Important: Variables must have their values wrapped in quotes, and referenced with the correct syntax.