! Smart Package Robot 's Mouse-Operations / IMO. / NMO. - If Mouse Option

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Mouse-Operations >

! Smart Package Robot 's Mouse-Operations / IMO. / NMO. - If Mouse Option

IMO. / NMO.  - If Mouse Option

Previous Top Next


MiniRobotLanguage (MRL)

 

IMO. Conditional Statement

If Mouse Option

 

 

Intention

 

Conditional Statement. Test several parameters about the mouse. You can test the following states:

 

    Is Mouse installed in the current system?

    Does the Mouse have a Mouse Wheel?

    Is the Left Button of the Mouse Up / Down?

    Is the Middle Button of the Mouse Up / Down?

    Is the Right Button of the Mouse Up / Down?

 

To make these tests, you specify a number or a keyword behind the IMO.-command.

 

Example:

 

IMO.IsMouse

 DBP.Yes we have a mouse

ELS.

 DBP.No we have no mouse

EIF.

 

In the same way you could have specified a number instead, which would do just the same:

 

IMO.1

 DBP.Yes we have a mouse

ELS.

 DBP.No we have no mouse

EIF.

ENR.

 

To test for a Mousewheel, you would similarly write:

 

IMO.iswheel

 DBP.Yes we have a mouse-wheel

ELS.

 DBP.No we have no mouse-wheel

EIF.

 

and you can even combine all the tests like this:

 

IMO.iswheel,ismouse

 DBP.Yes we have a mouse+wheel

ELS.

 DBP.No we have no mouse+wheel

EIF.

 

or use the numeric way - please always use the ( ...) for formulas:

 

IMO.(1+4)

 DBP.Yes we have a mouse+wheel

ELS.

 DBP.No we have no mouse+wheel

EIF.

 

or add the numbers yourself:

 

IMO.5

 DBP.Yes we have a mouse+wheel

ELS.

 DBP.No we have no mouse+wheel

EIF.

 

or separate them by comma:

 

IMO.1,4

 DBP.Yes we have a mouse+wheel

ELS.

 DBP.No we have no mouse+wheel

EIF.

 

Which will al do the same. Below you will find a list with the keywords and Options you can test for.

 

 

 

 

Syntax

 

IMO.P1[,P2...PX] … ELS. … EIF.

 

 

Parameter Explanation

 

P1 - Parameter that specifies one or more conditions to test for.

     You can either specify the keyword or the number. You can      

     also specify multiple keywords or numbers, separated by

     comma. You can also add the numbers when you specify the

     condition.

 

     "ismouse"       1   - TRUE if Mouse installed.

     "nomouse"       2   - TRUE if no Mouse installed.

     "iswheel"       4   - TRUE if Mouse Wheel installed.

     "nowheel"       8   - TRUE if no Mouse Wheel installed.

     "islmbdown"     16  - TRUE if Left Mouse Button (LMB) down.

     "islmbup"       32  - TRUE if Left Mouse Button (LMB) up.

     "ismmbdown"     64  - TRUE if Middle Mouse Button (MMB) down.

     "ismmbup"       128 - TRUE if Middle Mouse Button (MMB) up.

     "isrmbdown"     256 - TRUE if Right Mouse Button (RMB) down.

     "isrmbup"       512 - TRUE if Right Mouse Button (RMB) up.

 

 

 

 

Example

 

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

' IMO.-Sample

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

IMO.iswheel,ismouse

 DBP.Yes we have a mouse+wheel

ELS.

 DBP.No we have no mouse+wheel

EIF.

END.

 

 

 

Remarks

 

This command may get additional options in future updates.

 

 

 

Limitations:

 

-

 

 

 

See also:

 

    1.6.1. Program Flow Control

    GMP. - Get-Mouse-Position

    IPC. / NPC. - If-Pixel-Colour

    GPC. - Get-Pixel-Colour