Uopilot Script Commands !exclusive! Review
The number after repeat determines how many times the block executes. Unlike for , repeat doesn't modify variables during execution — it simply repeats using the initial value.
: Executes a block of code only if the condition evaluates to true.
The first word in a line is the command, followed by parameters. Any line starting with a non-command word or following is treated as a comment. Variable Prefixes: : Numeric variables (e.g., : String variables. : Array identifiers (can be one-dimensional or two-dimensional %arr [50 2] Time Units: Pauses default to milliseconds, but you can explicitly use (seconds), (minutes), or (hours), such as Essential Command Categories Key Commands Control Flow Handles conditional logic and loops. Mouse/Input double_left
Advanced scripts need to be able to "see" what's happening on the screen. UoPilot includes powerful functions for this. uopilot script commands
: Counts milliseconds from the start of the script or since the last set timer = 0 .
: Use the set workwindow command to bind UoPilot to a specific window. This ensures clicks go to the right place even if the window isn't in the foreground.
After obtaining a window handle with FindWindow , use workwindow to direct all subsequent commands to that specific window, even if it's in the background. The number after repeat determines how many times
| Command | Syntax | Description | |---------|--------|-------------| | MOVETO | MOVETO X, Y | Moves cursor to absolute screen coordinates. | | MOVEM | MOVEM Xoff, Yoff | Moves cursor relative to current position. | | CLICK | CLICK ["L" or "R" or "M"] | Clicks left (default), right, or middle button. | | DCLICK | DCLICK ["L" or "R"] | Double-clicks. | | DOWN | DOWN ["L" or "R"] | Presses and holds mouse button. | | UP | UP ["L" or "R"] | Releases mouse button. | | DRAG | DRAG X, Y | Drags from current position to X,Y (requires DOWN first). | | WH | WH +/- steps | Scrolls wheel up (+) or down (-). |
: Performs a right-click at specified coordinates. double_left , : Performs a double left-click. drag : Drags an item from x1,y1 to x2,y2 .
Variables allow your script to store data, count loops, and calculate coordinates dynamically. Working with Variables : Creates or updates a numeric variable. The first word in a line is the
: Directly checks if a pixel at x, y matches a specific color.
| Command | Description | |---------|-------------| | log text | Print to console/log | | logclear | Clear log | | fileread filename,var | Read file contents into var | | filewrite filename,text | Write text to file (overwrite) | | fileappend filename,text | Append text to file |
: Prefix with $ (e.g., set $name Player ). Comments : Use // to add notes that the script will ignore. 2. Core Execution Commands
All variables must be declared using the set command before they can be used. Here are a few examples:
: Sends a specific keystroke. For example, send Enter or send f .