PlugIn Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > PlugIn-Commands > PIS. - PlugIn Send >

PlugIn Commands

PIS.gh - GetHandle

Previous Top Next


MiniRobotLanguage (MRL)

 

PIS.GetHandle Command

Get the Window-Handle from the Buttonbar

 

 

Intention

 

The PIS.GetHandle -Command will return the Window-Handle from the specified Buttonbar.

Using P2 you can specify a number from 1 to (number of buttons) to get the Windowhandle from that Button.

The result is always placed on TOS.

 

 

clip0297       clip0298

          Get Windowhandle from Buttonbar (Tophandle)                                                Get Windowhandle from Buttonbar (Handle from Button 1)

 

 

 

 

Syntax

 

PIS.P1|GetHandle|P2

PIS.P1|gH|P2

 

 

Parameter Explanation

 

P1 - Variable which contains the PlugIn Index-No.

 

P2 - Button Number, starting with "1" to get the Button-Windowhandle, if omitted or 0, the returned handle is from the Top-Window of the Buttonbar

 

The result is always placed on TOS.

 

 

 

 

Example

 

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

' Vertical Plugin-Sample

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

'

'SPR Script-file: New Script_1

'Purpose:

'Author:

'Creation date: 02-08-2022 at 07:53:12

'===========================================================

'#EXE:?path\

'#SPI:ForceWrite

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

GSB.RunIt

'SWP.700,498|1612,165|T

 

' Return PlugIn Index Number

PIL.$$REA|01

 

' Set Button-Number

VAN.$$BUN=8

PIS.$$REA|sbn|$$BUN

 

' 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|2|2

 

$$HSI=160

$$VSI=30

PIS.$$PIN|sbhvs|$$HSI|$$VSI

 

' Set Button Text

FOR.$$LO2|1|$$BUN

 PIS.$$REA|sBt|$$LO2|Btn. F$$LO2

NEX.

PIS.$$REA|sBt|$$BUN|End

PIS.$$REA|sBt|1|Set Header Styles Sh. F1

PIS.$$REA|sBt|2|Rep. HL & Set Styles Sh. F2

PIS.$$REA|sBt|3|Sel. next & do B2 F3

PIS.$$REA|sBt|4|Rep empt. Icon F4

PIS.$$REA|sBt|5|Loc.Win. F5

PIS.$$REA|sBt|6|Small Title F6

PIS.$$REA|sBt|7|Loc.Win. F7

 

' Set Distance between buttons (vertical in Points)

PIS.$$REA|sbvd|4

 

PIS.$$REA|GetHandle|1

$$RES=$tos$

MBX.The handle is $$RES

 

' 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

:RunIt

$$PRO=HELPMAN.EXE

NEP.$$PRO

 STW.wctgX|0|TFrmHelpMan|Help+Manual|Locate_First  

ELS.

 GTO.Locate_First

EIF.

 

SAV.Save|$$FIL|$$PAT

IAI.Help+Manual 8|s

 $$FIL=$$001

 BLB.$$FIL|$$FIL

 BLB.$$FIL|$$FIL

 VBT.$$FIL

 VBT.$$FIL|"

 $$FIN=$$FIL\$$PRO

 DBP.$$FIN

 NEF.$$FIN

   $$ERO=HM8 nicht gefunden

   GTO.Error

 EIF.

 EXE.$$FIN

 PAU.3

 GTO.RunIt

ELS.

 $$ERO=HM8 nicht installiert.

 GTO.Error

EIF.

 

SAV.Restore

:Locate_First

STW.ctw|TFrmHelpMan|Help+Manual|45

'SWP.700,498|1612,165|T

HTV.$$ULT

SCW.nct|1|TdxHMRibbon|{&NOTEXT:}

HTV.$$RIB

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.$$BUN

   JSR.doEnd

 CAN.1

   JSR.doButton01

 CAN.2

   JSR.doButton02

 CAN.3

   JSR.doButton03

 CAN.4

   JSR.doButton04

 CAN.5

   JSR.doButton05    

 CAN.6

   JSR.doButton06

 CAN.7

   JSR.doButton07

 CAE.

   MBX.Button-Number: §§TMA is not defined.

   : $$RET=

 ESC.

EIF.

RET.

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

' Do Button 1

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

:doButton01

GSB.Set_Style_Headline

GSB.Set_Style_Sub_Headline

GSB.Set_Style_right_Sub_Headline

'

GSB.WaitShift

GSB.Locate_below_Selected

PAU.1

MLM.

GSB.Move_Mouse_To_B1

RET.

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

' Do Button 2

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

:doButton02

GSB.Mark_Headline

SDK.^v

GSB.Mark_Headline

PAU.0.5

GSB.Open_Style_Menu

GSB.Set_Font_Style|Heading1

GSB.Set_Style_Sub_Headline

GSB.Set_Style_right_Sub_Headline

'

GSB.WaitShift

GSB.Locate_below_Selected

PAU.0.25

MLM.

GSB.Move_Mouse_To_Button|2

RET.

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

' Do Button 3

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

' Jump to next and then Replace Headers

:doButton03

GSB.Locate_below_Selected

PAU.1

MLM.

PAU.1

WII.6

GSB.Mark_Headline

SDK.^v

GSB.Mark_Headline

PAU.0.5

GSB.Open_Style_Menu

GSB.Set_Font_Style|Heading1

GSB.Set_Style_Sub_Headline

GSB.Set_Style_right_Sub_Headline

'

GSB.Move_Mouse_To_Button|3

RET.

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

' Do Button 4

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

:doButton04

GSB.Locate_false_Icon

GSB.Locate_Icon_change_Menu

GSB.Locate_right_Icon

GSB.Move_Mouse_To_Button|4

RET.

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

' Do Button 5

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

:doButton05

FOR.$$LL5|1|8

 GSB.doButton03

 PAU.1

 IEK.LSHIFT

   ENR.

 EIF.  

NEX.

GSB.Move_Mouse_To_Button|5

RET.

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

' Do Button 6

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

:doButton06

GSB.Do_Mark_MRL

GSB.Set_Style_Small_Page_Title

GSB.Locate_Topline_Start

MLC.

GSB.Move_Mouse_To_Button|6

RET.

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

' Do Button 7

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

:doButton07

GSB.Locate_TW

GSB.Move_Mouse_To_Button|7

RET.

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

:TestMo

' react on Mouseover

IVS.§§TMB=!M!O!

 '

 GTO.MOut

EIF.

' react on Mouse-Leaves Button Area

IVS.§§TMB=!M!L!

 '

 GTO.MOut

EIF.

RET.

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

:MOut

RET.2

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

:doEnd

END.

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

:Error

MBX.$$ERO

GTO.doEnd

ENR.

'===========================================================

' These Subprogramms are unused

:GetMousePos

GSB.WaitShift

GMP.mw|§§POS

PRT.Mouse is: §§POS

RET.

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

:WaitShift

WNK.

:Laba

IEK.LSHIFT

 GTO.WSOut

ELS.

 PAU.0.1

 GTO.Laba

EIF.

:WSOut

RET.

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

:Locate_TW

IEW.$$ULT

 STW.h|$$ULT

ELS.

 STW.ct|TFrmHelpMan|Help+Manual

 HTV.$$ULT

 SWP.1090,130|1414,1665|T

EIF.

RET.

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

:Open_Style_Menu

GSB.Locate_TW

'SWP.1666,287|297,93|T

'MMV.t|428,125

SCW.nct|1|TdxHMRibbon|{&NOTEXT:}

SCW.nct|1|TdxRibbonGroupsDockControlSite|{&NOTEXT:}

SCW.nct|1|TdxRibbonGroupsDockControl|{&NOTEXT:}

SCW.nct|1|TdxRibbonGroupBarControl|Schriftart

MLI.w|117,61

WII.

PAU.0.1

RET.

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

:Set_Font_Style

$$STL=§§_01

STW.Ac|TdxBarDropdown

AGR.34!WII.MOS.|$$STL||1|3|60

RET.

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

:Do_Mark_MRL

GSB.Locate_Small_MRL

SKP.{END}

KYD.{LSHIFT}

SKP.{HOME}

KYU.{LSHIFT}

PAU.1

RET.

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

:Do_Mark_Line

GSB.Locate_TW

SKP.{HOME}

KYD.{LSHIFT}

SKP.{END}

KYU.{LSHIFT}

PAU.1

RET.

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

 

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

:Locate_Headline

GSB.Locate_TW

MLI.t|584,249

RET.

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

:Locate_Sub_Headline

GSB.Locate_TW

MLI.t|835,300

RET.

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

:Locate_right_Sub_Headline

GSB.Locate_TW

MLC.t|1126,298

RET.

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

:Mark_Headline

GSB.Locate_Headline

SDK.^a

'GSB.WaitShift

RET.

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

:Mark_Sub_Headline

GSB.Locate_Sub_Headline

SDK.^a

'GSB.WaitShift

RET.

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

:Mark_right_Sub_Headline

GSB.Locate_right_Sub_Headline

SDK.^a

'GSB.WaitShift

RET.

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

:Mark_Full_Sub_Headline

GSB.Locate_Sub_Headline

SDK.^a

SDK.^a

'GSB.WaitShift

RET.

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

:Set_Style_Line_Style

GSB.Open_Style_Menu

GSB.Set_Font_Style|LineStile

RET.

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

:Set_Style_Small_Page_Title

GSB.Open_Style_Menu

GSB.Set_Font_Style|Small Page Title

RET.

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

:Set_Style_Headline

GSB.Mark_Headline

GSB.Open_Style_Menu

GSB.Set_Font_Style|Heading1

RET.

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

:Set_Style_Sub_Headline

GSB.Mark_Sub_Headline

GSB.Open_Style_Menu

GSB.Set_Font_Style|Heading2

RET.

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

:Set_Style_right_Sub_Headline

GSB.Mark_right_Sub_Headline

GSB.Open_Style_Menu

GSB.Set_Font_Style|Heading3

RET.

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

:Move_Mouse_To_Button

$$STL=§§_01

VBT.$$STL

$$TXT=F$$STL

STW.ct|Form1_Class|MR

SCW.ct|ButtonEx_Class32|$$TXT

MPO.

RET.

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

:Move_Mouse_To_B1

GSB.Move_Mouse_To_Button|1

RET.

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

:Move_Mouse_To_B2

GSB.Move_Mouse_To_Button|2

RET.

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

'

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

:Locate_selected_TV_Element

' Code removed

RET.

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

:Locate_below_Selected

' Code removed

RET.

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

:Locate_false_Icon

' Code removed

RET.

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

:Locate_Icon_change_Menu

' Code removed

RET.

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

:Locate_right_Icon

' Coder removed

RET.

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

:Locate_Small_MRL

' Code removed

RET.

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

:Locate_Topline_Start

' Code removed

RET.

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

ENR.

 

 

 

 

 

 

 

 

 

 

 

 

 

Remarks

 

You can use up to 5 Plugins at the same time.

Just start them, each will get another Index.

To communicate with each PlugIn, you just give the PlugIn-Index to each command.

 

Button-Colors and transparency:

Please note that if you set Buttons transparent, that they can not have a background-color at the same time.

 

To set multiple Buttontext at once you can use:

PIS.$$PIN|sbt|all|Button %n

The "%n" is replaced with the number of that button.

The "all" and %n-scheme will also work with most other commands, where it makes sense.

 

 

Limitations:-

-

 

 

 

See also:

 

    PIL. - PlugIn Launch

    PIS. - PlugIn Send

    PIW. - PlugInWait