Input and Output Commands

<< Click to Display Table of Contents >>

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

Input and Output Commands

GUT. - Get User Text

Previous Top Next


MiniRobotLanguage (MRL)

 

GUT. Command

Get User Text

 

 

Intention

 

Get an input text from the user. Usage is easy:

 

GUT.

 

will show a dialog like this:

 

graphic

 

 

The cursor will blink, and the dialog will immediately take user input. The user can type up to 260 characters into the textbox. The result, will be place on TOS. You can try it using this sample script:

 

GUT.

STS.DUMP

MBX.Ready?

ENR.

 

Next you may want to change the Dialog-text and the dialog Headline.

These are parameters P2 and P3:

 

GUT.Please type your serial.|Serial question!

 

graphic

 

 

You may want to add a "default text". Like the one you can see in the picture below.

 

GUT.Please type your serial.|Serial question!|email@email.com

 

graphic

 

 

And finally you can have the result in the variable, P4.

Here is a complete Sample:

 

' Get User Text

: $$TXT=Please enter your mailadress.

: $$HEA=

: $$DEF=yourmail@yourdomain.com

GUT.$$TXT|$$HEA|$$DEF|$$RES

 

' Remove Invalid characters

GFS.e|$$RES

 

' Display result

MBX.Your Mailadress is:$crlf$$$RES

ENR.

 

 

Syntax

 

 

GUT.[P1][|P2][|P3][|P4]

 

 

Parameter Explanation

 

P1 - (optional) Text/Explanation to the user. If omitted, the phrase

          "Please Enter the required data:" is used. If you really want to have no text,

           use a blank, like this

        ' complete empty input-box

         GUT.

 

P2 - (optional) Text, window title. If omitted the phrase "User Input required!" is used.

          If you really want to have no text, use a blank, like this

         GUT.|Serial question!

 

P3 - (optional) Text, default Text for the textbox. If omitted no default text is given.

 

P4  -   (optional) Variable that will receive the user-text. If omitted, user-input

       is placed on TOS.

 

 

 

 

Example

 

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

'  GUT. - Sample

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

' Get User Text

: $$TXT=Please enter your mailadress.

: $$HEA=

: $$DEF=yourmail@yourdomain.com

GUT.$$TXT|$$HEA|$$DEF|$$RES

 

' Remove Invalid characters

GFS.e|$$RES

 

' Display result

MBX.Your Mailadress is:$crlf$$$RES

ENR.'*****************************************************

 

 

 

Remarks

 

If you do want to have secret information to be typed in, use GUP. instead.

 

 

 

Limitations:

 

 

-

 

 

 

See also:

 

    GUP. - Get User Password

    DBP - Debug Print

    DBM. - DeBugMode

    DIP. - Delayed Instruction Processing

    USM - Use silent Mode

    DMP. - Dump internat Informations