PlugIn Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > PlugIn-Commands >

PlugIn Commands

PIW - PlugInWait

Previous Top Next


MiniRobotLanguage (MRL)

 

PIW. Command

Plug In Wait

 

 

Intention

 

The PIW.-Command waits for a Message from a specified PlugIn.

Thats a separate Program which communicates with the robot.

There may be different PlugIns.

 

At the moment of this writing the only Plugin avaiable is PlugIn_01.exe - thats a sort of button-bar.

 

The PIW. waits till a button is pressed or a mouseover event happened then gives the result back in P2. P1 contains the PlugIn Index from PIL

 

 

 

 

Syntax

 

PIW.P1|P2[|P3]

 

 

 

 

Parameter Explanation

 

P1 - variable with the the PlugIn Index-No. from PIL.

 

P2 - Variable which holds the number of the event that happened

    to the PlugIn.

 

P3 - (optional) Timeout-Value. After this time in seconds PIW. is left (without any Event) and the Timeout-Flag is set.

 

 

PIW. returns a number of Messages in P2 from the PlugIn:

 

' 12345 represents the window to which the Plugin has been attached using PIS.$$PIN|attach

 

' Close is returned when the window which the Plugin is attached to has been closed/does not respond.

12345 !Closed!

 

' Iconic is returned, when the window which the Plugin is attached to has been iconized.

12345 !Iconic!

 

' When the window becomes normal sized from being iconized, the Plugin reports

12345 !nsize!

 

' invisible is returned the window which the Plugin is attached to has been made invisible using MWI*.

12345 !invisible!

 

' When the window becomes visible from being invisible, the Plugin reports

12345 !visible!

 

' disabled is returned the window which the Plugin is attached to has been made disabled using MWE*.

12345 !disabled!

 

' When the window becomes visible from being invisible, the Plugin reports

12345 !enabled!

 

' normal is returned, if the window which has been iconized or made invisible or was disabled becomes "usable" again. Usable is a window which is enabled, visible and not iconized.

12345 !normal!

 

' "D"ouble-"P"ressed is been returned on a Doubleclick on that Button

' The number 5 represents in this case the number for the button

' which has been pressed.

5 !P!D!

 

' "P"ressed is been returned on a Click on that Button with left Mousebutton

' The number 5 represents in this case the number for the button

' which has been pressed.

5 !P!

 

' "R"ight is been returned on a Click on that Button with Right Mousebutton

' The number 5 represents in this case the number for the button

' which has been pressed.

5 !R!

 

' Mouse Over is been returned if the Mouse is over the specified

' button. In fact the Message is returned once the Mouse enters the

' button area.

' The number 5 represents in this case the number for the button

' which area has been entered.

5 !M!O!

 

' Mouse Left is been returned if the Mouse has left the specified

' button area with a mouse move. In fact the Message is returned

' once the Mouse leaves the button area.

' The number 5 represents in this case the number for the button

' which area has been left.

5 !M!L!

 

' The OK Message is been sent in Response to commands given to

' the PlugIn as a Reply.

' OK

 

Additionally there custom responses from the PlugIn depending on the command being sent.

With PIS. for example "gethandle".

 

 

-------

* not implemented at the time of this writing.

 

 

 

Example

 

' The following code is symbolic, can not run like this,

'

DOL.1

' Wait for PlugIn Event, Returncode in $$RET

PIW.$$PIN|$$RET

 

JSR.react

OOP.

 

'-------------------------------------------------

:react

' Get Button number out of $$RET into §§TMA

SBD.$$RET|$sp$|1|§§TMA

' Button Action into §§TMB

SBD.$$RET|$sp$|2|§§TMB

 

PRT. Button pressed: §§TMA

PRT. Action-code: §§TMB

 

' react on Mouseover

IVS.§§TMB=!M!O!

PIS.$$PIN|sbbc|§§TMA|$$COM

EIF.

 

' react on Mouse-Leaves Button Area

IVS.§§TMB=!M!L!

PIS.$$PIN|sbbc|§§TMA|$$COL

EIF.

 

' react on Buttonpress

IVS.§§TMB=!P!

SCS.§§TMA

CAN.5

JMP.enx

CAN.1

JSR.doButton01

CAN.2

JSR.doButton02

CAN.3

JSR.doButton03

CAN.4

JSR.doButton04

CAE.

' PRT.Undefined Button-Number: §§TMA

: $$RET=

ESC.

EIF.

RET.

 

 

 

Remarks

 

You can use up to 5  Plugins. Just start them, each will get another Index.

 

 

 

Limitations:

 

-

 

 

See also:

    PIL. - PlugIn Launch

    PIS. - PlugIn Send

    PIW. - PlugInWait