|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Mouse-Operations > !Input Engine > Input Engine Mouse-Operations |
MiniRobotLanguage (MRL)
MIL. Command
Mouse Input Left Click (Input Engine)
Intention
The MIL. command is your handy tool for simulating left mouse clicks without moving your real mouse. Think of it as a virtual finger that taps buttons or selects items for you, leaving your mouse pointer free for whatever you’re already doing.
Using the Input Engine, MIL. sends a clean, reliable left-click to the active application. It’s perfect for clicking buttons, selecting options, or starting actions in the foreground window—without the hassle of repositioning your mouse. Your cursor stays put, so you can keep working smoothly while MIL. handles the clicking.
It’s great for automating everyday tasks—like installing software or navigating menus—in the window you’re focused on. The click happens at the current "Active Point," which you can set by locating a button or control first. Need to move it? See MAP - Move Active Point for more.
Hints:
• Works best with the active, foreground window. For hidden or minimized windows, try MLE. instead.
• If MIL. doesn’t click as expected, switch to MLE. or BSC. for a different method.
• Ideal for quick, reliable left-clicks in the app you’re working with, like selecting or confirming options.
Syntax
MIL.[P1|][P2,P3]
Parameter Explanation
P1 - (optional) prototype coordinates
Prototype can be omitted or any of:
GROUP I (based on rectangular Area) Prototypes
"w" - choose RECT from last located Window (Child-/ or Top-Window)
"t" - choose RECT from last located Top-Window
"k" - choose RECT from last located Child-Window
"a" - choose RECT from last located Accessible Object (E8) (using SAO.,AGR.,NAV. etc.)
"g" - choose RECT from last located graphical Object (E9) (using QFR,, ANA., UNI. etc.)
"o" - choose RECT from last located Object/Window (any sort of)
"s" - use Screen-Coordinates, these will go over the whole Screen, including Dual- or Multi-Monitors
for these "Base-Prototypes" you can specify additionally fine-tuning using:
- Quadrant coordinates like: MIL.o|{A2-B4}
- numeric numbers (positive and negative): MIL.o|-20,90
and you can combine this: MIL.o|-20,90 {A2-B4}
also there are three Prototypes that will do sort of "left-right" or "Mid" Positioning. These 3 can not be combined with each other.
"d" - Sort of LBO. - Positioning on the Left side of the current Rectangle.
"e" - Sort of RBO. - Positioning on the Right side of the current Rectangle.
"r" - Midpoint of the last RECT (default)
GROUP II (based on Point) Prototypes
"m" - actual mouse-position.
"b" - last mouse-position, before last Move.
"p" - current "Active Point". (Default)
"l" - Last "Active Point".
If prototype is omitted, Screen-Coordinates are taken.
"x" - Set Active Point to the Command-position.
P2, P3 - (optional) x,y - coordinates
numeric coordinates, separated by comma. You can use variables and formulas in (..). You can also use a Point-Variable instead of two coordinates.
Example
'***********************************
' MIL.-Demo
'***********************************
STW.ct|PBWindowClass:0|TestApp
SCW.nct|2|Button|Left Click Zone
MIL.
MIL.r|(12*2),(-6)
ENR.
Remarks
For automating left-click tasks in the active window, MIL. offers a straightforward, dependable solution.
Limitations:
Requires the target window to be in focus; won’t work on minimized or hidden windows.
See also:
• 1.C Direct Engine and Compatible Engine
• MLE. - Mouse-Left-Click Event
• MIM. - Mouse Input Middle Button
• MEM. - Mouse Event Middle Button Click
• MIR. - Mouse Input Right Click