PlugIn Commands

<< Click to Display Table of Contents >>

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

PlugIn Commands

PIS.SetButtonForeColor / SetButtonBackColor - sbfc / sbbc

Previous Top Next


MiniRobotLanguage (MRL)

 

PIS.SetButtonForeColor Command
PIS.SetButtonBackColor Command

PlugInSend Set Color of of Buttons

 

 

Intention

 

The PIS.SetButtonForeColor / SetButtonBackColor-Command will set the color of the Buttons.

Using PIS.SetButtonForeColor you can specify the color in which the Text will appear on the Button.

Using PIS.SetButtonBackColor you can specify the Background color of the Button.

The color is generally specified as a decimal or hexadecimal number like "&h123456".

On this number the Order is:"&HRRGGBB" each of the pairs is 0-FF (hex).

For any of these commands, you can specify "default" instead, then the Windows-default color will be chosen.

 

PIS.$$REA|SetButtonForeColor|4|&Hffa0b3

PIS.$$REA|SetButtonForeColor|5|default

 

PIS.$$REA|SetButtonBackColor|4|&HF0A0B3

PIS.$$REA|SetButtonBackColor|5|default

 

:Again

FOR.$$LU2|1|255|1

  RND.1|$$BUN|$$BTN

  RND.0|255|$$GRN

  VTH.$$GRN|$$GRN

  VTH.$$LU2|$$RED

  CAL.$$HLU=255-$$LU2

  VTH.$$HLU|$$BLU

  VAR.$$BGC=&H$$RED$$GRN$$BLU

  PIS.$$REA|SetButtonBackColor|$$BTN|$$BGC

  ANA.Complementary_Color|$$BGC|$$FOR

  PIS.$$REA|SetButtonForeColor|$$BTN|$$FOR

  PAU.0.01

NEX.

MBX.!1

GTO.Again

 

 

Samples for Colored Buttons, using the Script above.

 

clip0321     clip0322     clip0324

 

 

 

 

 

Syntax

 

PIS.P1|SetButtonForeColor|P2|P3

PIS.P1|Sbfc|P2|P3

 

PIS.P1|SetButtonBackColor|P2|P3

PIS.P1|Sbbc|P2|P3

 

 

Parameter Explanation

 

P1 - Variable which contains the PlugIn Index-No.

P2 - value - Button-Number of the Button the color should be changed.

P3 - value - Color-Value "&Hffa0B1" in Format "&HRRGGBB" or the text: "default"

 

 

Example

-

 

 

 

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