Input and Output Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Input- and Output commands >

Input and Output Commands

SHT. - Show Text

Previous Top Next


MiniRobotLanguage (MRL)

 

Show Text

Show Textual Information to user

 

 

Intention

 

This command is used to display textual Information. You can influence where the Bubble is displayed as well as the Text-Size and Colors.

The following Script will display a "Hello World" on the upper right side of your screen. This way you can easily message something to your users.

 

' Let's start simple

SHT.Hello World.

PAU.8

ENR.

 

SHT_6

 

 

Why do we need the "PAU.8" ?
It's needed because the Command - per default runs in the Background. It starts to display the Text, and WHILE the text is displayed the Script continues to run.

Now, if the Script ends - the Bubble will also be closed!

 

To prevent this you can add a second Parameter:

 

' Let's start simple

SHT.Hello World.|#

ENR.

 

This will make the Script wait until the message goes away. The default time for the message to disappear is 6 Seconds.

How can we change that?  We add another Parameter:

 

SHT.Hello World.|# T:12

ENR.

 

Now the Text will disappear after 12 Seconds. What else can we change?

We can change: Colors, Text-Size and Font and Boldness and also the Position.

 

To do this, the Parameters as shown below can be given.

 

   SHT.Click here to continue.|DOT: t: 5 BF:4 fs:115  fn:"Tomorrow People" cs:1 # bc:"111111" tc:"FFFFFF" lc:"0000FF"

 

SHT_4

 

 

SHT.Click here to continue.|DOT: t: 5 BF:4 fs:115  fn:"Tomorrow People" cs:1 bc:"11FFFF" tc:"111111" lc:"0000FF"

PAU.10

ENR.

 

Using other colors and custom fonts will produce this result. Notice the "Dot" on the left side?

It's from the "DOT:" Parameter.

 

SHT 5

 

 

' More compelx Sample

$$TXT=RED ALERT. $crlf$ Honeypot was hacked!!$crlf$Please check files.

 

FOR.$$CNT|1|5

  DIT.#

  $$PAR=FS:40 t:1 cs:1 bc:"0000F0"# lc:"00FF00"

  SHT.$$TXT|$$PAR

  DIT.2

NEX.

PAU.2

ENR.

 

SHT_9

 

 

 

Syntax

 

 

SHT.P1[|P2][#]

 

Parameter Explanation

 

P1 -  Text to be displayed

        This can be a Text or a Text-Variable that will be displayed in the Bubble-Text.
        It may contain $crlf$ - these will be treated as NewLine".

 

P2 - (optional)  Flags and Parameters

    # -  will have the Script wait until the Bubble-time is over.

 

T:(NUM)    - Time in Seconds, specify how long the Bubble-Text shall be displayed. The Bubble will anyway be closed when the Script ends! If not given the default time is 6 Seconds.

FS:(NUM)  - FontSize: An number that specifies the size of the Font that shall be used.

FN:"FONTNAME" - Specify any Font that is on your Computer. Notice that the Fontname must be between " ".

VC: - Vertical Center.  This will Center the Text vertically.

HC: -  Horizontal Center. This will Center the Text horizontally.

AX:(NUM) -  Adjusting X-Position. This value can be negative or positive. It will move the Text by this number of pixels left (if negative value) or right.

     AY:(NUM)-  Adjusting Y-Position. This value can be negative or positive. It will move the Text by this number of pixels up (if negative value) or down.

MP: -  Mouse Position. If specified then the Text will be generated at the Position where the Mouse Pointer is.

CS:   - Center on Screen. This will Center the Text on Screen.

BF:(NUM)  - Bold-Faktor, Number 0-9. The higher the number - the bolder the Text.

DOT:1  - Will Paint an DOT at the left of the Text.

AHT 1

BC: -  Background-Color for Text must be in Hexadezimal and in "". Format is: BBGGRR

    Example:     BC:"000000"

LC: -  Line-Color for Surrounding Box must be in Hexadezimal and in "". Format is: BBGGRR

    Example:      LC:"0000FF"

TC: -  Text-Color for Text must be in Hexadezimal and in "". Format is: BBGGRR

    Example:     TC:"FFFFFF"                                  

 

 

 

Example

 

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

' SBT. - Sample

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

 

SHT.Click here to continue.|DOT: t: 5 BF:4 fs:115  fn:"FUTURA BOLD" HC:1 VC:1 # bc:"FF0001" tc:"FFFFFF" lc:"0000FF"

ENR.

 

SHT_2

 

 

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

 

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

 
' More complex Sample

$$TXT=These will make the script run with full speed. $crlf$

$$TXT=$$TXT $$TXT$$TXT$$TXT$$TXT$$TXT$$TXT

 

FOR.$$CNT|1|5

 CAL.$$XPO=(-100*$$CNT)

 CAL.$$YPO=100*$$CNT

 $$PAR=FS:12 t:10 cs:1 ax:$$XPO ay:$$YPO

 SHT.$$TXT|$$PAR

NEX.

PAU.2

ENR.

 

SHT_3

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

 

    SBT. - Show Bubble Text

    DBM. - DeBugMode

    DBP - Debug Print

    DBV. - Debug Print Variable

    DMP. - Dump internat Informations

    USM - Use silent Mode

    OPT. - Optional Settings

  PAU. - Pause