A variable is a "named box" used to store data at runtime (such as the result coordinates of an image search, OCR-recognized text, a counter, and so on).
How to use one:
Ctrl+3): give it a name (e.g. count), choose a type (string/number/boolean), and set a default valueTypical usage:
result), including coordinates and confidenceConditions let your script "take different paths depending on the situation". Every node can have an execution condition set (at the bottom of the node configuration):
count >= 5 (only run after more than 5 loop iterations)How are "success/failure" defined?
The Loop node is a container — drag other nodes into it and they'll be executed repeatedly. Three modes:
How to use:
Tip: in an infinite loop, we recommend adding a short "Wait" node (e.g. 100ms) to avoid excessive CPU usage.
A function "packages" a group of nodes into a reusable module. Define it once, then call it multiple times from the main flow.
When to use one?
How to use:
Ctrl+5) and edit its internal nodesFunctions can call each other, and they can access global variables.
An expression is a snippet of Lua code that produces a value when run. It lets you perform calculations, concatenation, comparisons, and other flexible operations.
Places where you can use expressions:
count >= 10 and hp < 30count + 1, name .. "_done""Loop #" .. countmath.random(500, 1500) (random wait)Common syntax:
a + b, a * 2, a % 3"hello" .. namex > 100, name == "test"a and b, a or b, not aWhen "Expression" is not checked, the input field's content is treated as plain text/a number.