PlugIn Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > PlugIn-Commands >

PlugIn Commands

PIL - PlugInLaunch

Previous Top Next


MiniRobotLanguage (MRL)

 

PIL. Command

PlugInLaunch

 

 

Intention

 

The PIL-Command launches a PlugIn. A PlugIn is (for example) a button-bar like the one in this picture:

 

graphic

 

A PlugIn is a separate Program which communicates with the robot.

 

There may be multiple PlugIn's running at the same time

 

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

 

 

 

Syntax

 

PIL.P1|P2

 

 

Parameter Explanation

 

P1 - variable which becomes the PlugIn Index-No

P2 - PlugIn typ-number, actually always 01

 

 

 

 

Example

 

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

'SPR Script-file: NoLimits 2 AddOn

'Purpose:

'Creation date: 12-17-2015,22:47:50

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

 
' This will run the NoLimits2 in case its not yet running

STW.ctwV|NL3D_MAIN_|NoLimits 2|1|runnl2

' Possible Commands are: SWP. | SWS.

SWP.5,2|1527,1112|T

HTV.$$ULT

 

PIL.$$REA|01

' use any window to attach the plugin

 

PIS.$$REA|sbhd|4

 

' Plugin vertikal anordnen

PIS.$$REA|sv

' Make the PlugIn visible

PIS.$$REA|show

 

' attach the Plugin to the window

PIS.$$REA|attach|$$ULT|0|0

 

' Set Button Text

PIS.$$REA|sBt|1|Btn. F1

PIS.$$REA|sBt|2|Btn. F2

PIS.$$REA|sBt|3|Btn. F3

PIS.$$REA|sBt|4|Btn. End

 

' Set Distance between buttons (vertical in Points)

PIS.$$REA|sbvd|4

 

PIS.$$REA|sbn|4

 

' Farben für Mouseover

$$COM=&HFF00FF

$$COL=&H00FFFF

 

' Endlos-Schleife

DOL.1

 PIW.$$REA|§§BTN|4

 ITO.

   PAU.0.1

   GTO.MLop

 EIF.

' Button wurde geklickt oder Mouseover

 GSB.react

 :MLop

OOP.

 

PAU.2

:enz

END.

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

' Starte NL2

:runnl2

CHD.?cstartprog\NoLimits$sp$2\

EXO.?cstartprog\NoLimits$sp$2\NoLimits$sp$2.lnk

STW.ct|NL3D_MAIN_{7F825CE1-21E4-4C1B-B657-DE6FCD9AEB12}|NoLimits 2

RET.

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

:react

 

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

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

 

' Button Action into §§TMB

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

 

PRT. Button pressed: §§TMA

PRT. Action-code: §§TMB

 

GSB.TestMo

 

' react on Buttonpress

IVS.§§TMB=!P!

 SCS.§§TMA

 CAN.4

   JSR.doEnd

 CAN.1

   JSR.doButton01

 CAN.2

   JSR.doButton02

 CAN.3

   JSR.doButton03

 CAE.

' PRT.Undefined Button-Number: §§TMA

   : $$RET=

 ESC.

EIF.

RET.

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

:doEnd

END.

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

:doButton01

PRT.B1 pressed

GSB.WaitShift

GMP.mw|§§POS

PRT.Mouse is: §§POS

RET.

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

:doButton02

DBP. B2 pressed

RET.

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

:doButton03

DBP. B3 pressed

RET.

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

:WaitShift

WNK.

:Laba

IEK.LSHIFT

 GTO.WSOut

ELS.

 PAU.0.1

 GTO.Laba

EIF.

:WSOut

RET.

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

:TestMo

' react on Mouseover

IVS.§§TMB=!M!O!

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

 GTO.MOut

EIF.

 

' react on Mouse-Leaves Button Area

IVS.§§TMB=!M!L!

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

 GTO.MOut

EIF.

RET.

' On Mouseover return directly to Mainloop (RET.2)

:MOut

RET.2

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

 

 

 

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