|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Mouse-Operations > !Input Engine > Direct Engine Mouse-Operations |
MiniRobotLanguage (MRL)
MIM. Command
Mouse Input Middle Button (Input Engine)
Intention
The MIM. command gives you a powerful way to simulate middle mouse button clicks without moving your actual mouse. It’s like having an extra pair of hands that can click for you, leaving your mouse pointer free for other tasks.
What makes MIM. special is that it delivers two clicks at once using two different methods. This doubles your chances of triggering the right action in an application, especially when one method alone might not work. Plus, your real mouse stays put, so you can keep working naturally while MIM. handles the clicking behind the scenes.
You can use it to click on hidden windows, disabled buttons, or even controls that are off-screen—places your real mouse can’t reach. It’s perfect for automating tasks where you need reliable middle-click actions without interrupting what you’re doing with the mouse.
The action happens at the current "Active Point," which is usually set by finding a button, control, or object beforehand. Want to know more about moving the Active Point? Check out MAP - Move Active Point.
Hints:
• Since it uses the input engine, MIM. needs the target application to play along. Some apps (like certain JAVA ones) might not respond well.
• If MIM. doesn’t get the job done, try BSC. or BCS. for a different approach.
• Great for opening new tabs or scrolling in apps that use the middle button, without touching your mouse.
Syntax
MIM.[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: MIM.o|{A2-B4}
- numeric numbers (positive and negative): MIM.o|-20,90
and you can combine this: MIM.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
'***********************************
' MIM.-Demo
'***********************************
STW.ct|PBWindowClass:0|TestApp
SCW.nct|2|Button|Middle Click Zone
MIM.
MIM.r|(10*2),(-5)
ENR.
Remarks
For automated tasks requiring middle clicks, MIM. is a reliable choice due to its dual-click approach.
Limitations:
Some applications may not respond to both click methods, but the dual approach increases success rates.
See also:
• 1.C Direct Engine and Compatible Engine
• MLE. - Mouse-Left-Click Event