Compatible Engine Mouse-Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Mouse-Operations > Compatible Engine >

Compatible Engine Mouse-Operations

MRC. - Mouse-Right-Click

Previous Top Next


MiniRobotLanguage (MRL)

 

MRC. Command

Mouse Right Click  (Invinsible)

 

Compatible Engine_01

 

Intention

 

MRC. simulates a Mouse-Move to, and a Right-Click at the target Position.

 

This Command simulates a Right-Click with the Mouse, using the Compatible Engine.

It can be used to call all sorts of PopUp-Menus. To answer the upcoming popup-menus, see the SMH. - Set Menu Hook command.

 

The usage of the command is simple, you can just write:

 

MRC.

 

Then the mouse pointer will  move to the current "Active Point" and do the Click.

In most cases the "Active Point" is been set, by localizing a button or control or object.

In that case, the "Active Point" is in the center of the rectangular object.

You can find some more details on the "Active Point" and how to move it, here:

MAP - Move Active Point.

 

This command will simulate a  real Mouse-Move, even with a "Human touch", if this is been set, using

 

OPT.HM|35

 

This is a are very realistic Mouse Move and a Mouse Right-Click at the target.

 

MRC. has therefore all the strong and all the weak sides of a typical Compatible Engine command.

 

MRC. is a real Mouse-Click, which needs the window to be on top of other windows. Also it will  need a mouse-pointer and a desktop.

 

You can find some more details on the "r"-prototype here: MAP - Move Active Point.

 

 

 

 

Syntax

 

MRC.[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:

 MMV.o|{A2-B4}

 - numeric numbers (positive and negative) 

 MMV.o|-20,90

and you can combine this:

 MMV.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)

"u" - Move down by the size of the Windows-Titlebar

"v" - Move up by the size of the Windows-Titlebar

 

' Example (Combination):

 MMV.oe|-20,90 {A2-B4}

 

GROUP II (based on Point) Prototypes

"m" - actual mouse-position. Usefull if the user moves the mouse somewhere and you want to act on that 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.

 

P2, P3 - (optional) x,y - coordinates

    numeric coordinates, separated by comma. You can use

    variable and Formula in (..). You can also use a

    Point-Variable instead of two coordinates.

 

 

Mostly you do not need to specify the coordinates with MRC. or MRI. but you locate the position with STW., SCW., SAO. or MPO. etc.

 

 

 

 

Example

 

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

' SMH./MRC._Sample

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

' Select the TestApp

STW.ct|PBWindowClass:0|TestApp

 

' Select the Textbox

SCW.nc|3|edit

 

' Tell Hook that soon a Menu will pop up, he should click

' Einfügen (engl. "Paste")

SMH.Einfügen

 

' Now we move the Mouse to the Textbox and click the

' right Mousebutton

MRC.

 

' This Pause is needed, because if the script ends, the SMH.

' will also end, before the Menu is been clicked!

PAU.2

 

ENR.

 

 

 

Remarks

 

MRC / MRI. is the right Command to open a PopUp-Menu, because this may not work in all cases with MRE as expected.

 

 

 

 

Limitations:

 

 

 

 

See also:

 

    1.C Direct Engine and Compatible Engine

    SMH. - Set Menu Hook

    MLE. - Mouse-Left-Click Event

    MLM - Mouse Left click Move (Invinsible)

    MLI - Mouse Left Click quIckly (Invinsible)

    MRC. / MRI. - Mouse-Right-Click

    MMV - Mouse MoVe

    OPT. - Optional Settings