AIU. - Artificial Intelligence Utility

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Operator Mode >

AIU. - Artificial Intelligence Utility

AIU.OperatorSetScreen

Previous Top Next


MiniRobotLanguage (MRL)

 

AIU.OperatorSetScreen
Configures the screen resolution mapping for the Operator.

 

Intention

 

The AIU.OperatorSetScreen command (aliased as AIU.Oss) is a critical setup step for Operator Mode. It tells the system how to translate the screen coordinates received from the AI into the actual coordinates on the user's desktop. This is essential for the AI to accurately perform tasks like clicking the mouse.

 

It’s like calibrating your robot’s vision—AIU.OperatorSetScreen ensures that when the AI decides to click on a button it sees, the mouse actually moves to the correct pixel on your real screen.

 

Illustration

 

┌───────────────────┐                      ┌──────────────────────────┐

│ AI View (Virtual) │                      │ Real Desktop (Physical)  │

├───────────────────┤                     ├──────────────────────────┤

│ AI sees button at │                      │ Mouse clicks button at   │

│ (512, 384)        ├─────────▶        │ (960, 540)               │

│ on a 1024x768 img │              │ on a 1920x1080 screen    │

└───────────────────┘                    └──────────────────────────┘

Mapping the AI's virtual coordinates to the real screen.

 

Syntax

 

AIU.OperatorSetScreen[|$$AIW|$$AIH|$$RLW|$$RLH]

 

Parameter Explanation

 

P1 - $$AIW - (Variable, numeric, Optional)

The virtual width of the screen image sent to the AI. If omitted, defaults to 1920.

 

P2 - $$AIH - (Variable, numeric, Optional)

The virtual height of the screen image sent to the AI. If omitted, defaults to 1080.

 

P3 - $$RLW - (Variable, numeric, Optional)

The real width of the user's desktop. If omitted, it is auto-detected.

 

P4 - $$RLH - (Variable, numeric, Optional)

The real height of the user's desktop. If omitted, it is auto-detected.

 

Examples

 

'***********************************

' AIU.OperatorSetScreen - Sample 1: Full Auto-Detection

'***********************************

' Let the system detect the real screen size and use default AI canvas size (1920x1080).

AIU.OperatorSetScreen

MBX.OK|Screen state configured automatically.

END.

 

'***********************************

' AIU.OperatorSetScreen - Sample 2: Specify AI Canvas, Auto-detect Real Screen

'***********************************

' Tell the AI it is looking at a 1024x768 image, but let the system detect the real screen size.

VAR.$$AIW=1024

VAR.$$AIH=768

AIU.OperatorSetScreen|$$AIW|$$AIH

MBX.OK|Screen state configured with a 1024x768 AI canvas.

END.

 

'***********************************

' AIU.OperatorSetScreen - Sample 3: Full Manual Configuration

'***********************************

' Manually specify all dimensions.

AIU.OperatorSetScreen|1024|768|1920|1080

MBX.OK|Screen state manually set.

END.

 

Remarks

 

- This command must be called after AIU.OperatorBeginSession and before any command that involves screen interaction, like AIU.OperatorRunStep.

- The settings are stored in the State Array for the current session and are used internally by AIU.OperatorRunStep to transform mouse coordinates.

 

See also:

 

AIU.OperatorBeginSession

AIU.OperatorRunStep

AIU.Screenshot