Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 6 of 10

TT Advantage Programmer's Guide, pages 51 to 60

Pages 51 to 60 of 92

The original document is the PDF (976 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the HHP TT3100 and Welch Allyn TT3100

Page 51

TxtBox.Load(ControlName, VarName) as Boolean TxtBox.Load copies the contents of the VarName into ControlName. Parameters

Description

ControlName

Name of the TextBox control

Values Must be a screen control name in the format of form control.

VarName

Variable name contains string value

String

RETURN VALUES Boolean - True if successful SEE ALSO TxtBox.Save EXAMPLE Tool.TxtBox.Load PadScreen1.TextBox1, “CustName” This example takes the value in the variable CustName and copies it into the padScreen1 form textbox control TextBox1.

TxtBox.Save(ControlName, VarName) as Boolean TxtBox.Save copies the contents of the ControlName into the VarName. Parameters

Description

ControlName

Name of TextBox

Values Must be a screen control name in the format of Form.Control

VarName

Variable name stores string value

String

RETURN VALUES Boolean - True if successful SEE ALSO TxtBox.Load EXAMPLE Tool.TxtBox.Save padScreen1.txtCustName, “CustName” This command copies the contents of the TextBox control txtCustName on the form padScreen1 into CustName.

3-31

Page 52

TxtBox.SendKeys(ControlName, Keys) as Boolean TextBox.SendKeys sends text to a control then refreshes the control image. This command appends text to the contents of a Control. Parameters

Description

ControlName

Name of the TextBox control

Values Must be a screen control name in the format of form control

Keys

String

Characters to append

RETURN VALUES Boolean - True if successful EXAMPLE Tool.TxtBox.SendKeys padScreen1.txtTotal, “110.99” This command appends the text “110.99” to the end of the TextBox control, (txtTotal), on the form, (padScreen)1.

UNIT Unit The UNIT commands provide information about a TT3100 Series terminal the script is running.

Unit.Model as Integer Unit.Model returns the model number of the TT3100 Series terminal running the script. Parameters

Description

Values

None

RETURN VALUES Integer SEE ALSO Unit.Version EXAMPLE Tool.Var.SetVar “NumModel” , Tool.Unit.Model

Unit.Version as Integer Unit.Version returns the version number of the firmware running on a TT3100 Series terminal. Parameters None

RETURN VALUES Integer

3-32

Description

Values

Page 53

SEE ALSO Unit.Model EXAMPLE Tool.Var.SetVar “NumVersion” , Tool.Unit.Version

V r Var The VAR commands handle variables. There are subcommands under the VAR command. These subcommands are Bin, Num, and Str. They control the following: Command

Data Used

Var.Bin

Binary data

Var.Num

Numeric data (integers)

Var.Str

String data

Var.DeleteVar(VarName) Var.DeleteVar removes the variable name and frees its memory resources. Parameters

Description

Values

VarName

The name of a variable

Case sensitive

RETURN VALUES None EXAMPLE Tool.Var.DeleteVar “IsCardSwiped”

Var.FindVar(VarName) as Boolean Var.FindVar indicates if VarName exists. Parameters

Description

Values

VarName

The name of a variable

Case sensitive

RETURN VALUES Boolean - True if the variable exists. EXAMPLE Tool.SCRIPT.IfTrue Tool.Var.FindVar("CustName"), Tool.SOUND.Bell(Success), Tool.SOUND.Bell(Fail)

3-33

Page 54

Var.SetVar(VarName, Command) as Boolean Var.SetVar assigns the result of a command into VarName Parameters

Description

Values

VarName

Name of a variable (case sensitive).

Case sensitive

Command

A command that returns a value.

Script command with function syntax

RETURN VALUES Boolean - True if VarName was successfully set to the value that Command returned. EXAMPLE Tool.Var.SetVar“FullName”, Tool.Var.Str.Concat(“FirstName”, “Space”, “LastName”)

V r Bin Var.Bin Var.Bin commands handle binary data.

Var.Bin.SetVar(VarName, Data) as Boolean Var.BinSetVar sets VarName to Data (binary). Parameters

Description

Values

VarName

Name of a variable

Case sensitive

Data

Raw binary data

Binary data

RETURN VALUES Boolean - True if successful. SEE ALSO Var.Num.SetVar, Var.Str.SetVar EXAMPLE Tool.Var.SetVar “IsSet” , Tool.Var.Bin.SetVar “Mode”, 2 This line of code sets the variable, “Mode”, to 2.

Var.Bin.ToBase64(VarName) as String Var.Bin.ToBase64 converts binary data in VarName to Base64 format. Parameters

Description

Values

VarName

Name of variable containing binary data

Case sensitive

RETURN VALUES String that contains data in Base64 format 3-34

Page 55

SEE ALSO Var.Bin.ToHex EXAMPLE Tool.Var.SetVar “Mode_Base64” , Tool.Var.Bin.ToBase64 (“Mode”)

Var.Bin.ToHex(VarName) as String Var.Bin.ToHex converts binary data in VarName to hexadecimal format. Parameters VarName

Description

Values

Name of variable that contains binary

Case sensitive data

RETURN VALUES String that contains data in hexadecimal format SEE ALSO Var.Bin.ToBase64 EXAMPLE Tool.Var.SetVar “ID_Hex” , Tool.Var.Bin.ToHex (“ID”)

Var.Num VAR.NUM commands handle numeric information in the form of integers.

Var.Num.Dec(VarName) Var.Num.Dec decrements the number in VarName by one. Parameters VarName

Description

Values

Name of variable that contains numeric

Case sensitive data

RETURN VALUES None SEE ALSO Var.Num.Inc EXAMPLE Tool.Var.Num.Dec “Count”

3-35

Page 56

Var.Num.Diff(VarName1, VarName2) as Integer Var.Num.Diff subtracts the integer stored in VarName2 from the integer stored in VarName2 and returns the difference between the variables. Parameters VarName1

Description

Values

Name of variable that contains numeric

Case sensitive value VarName2

Name of variable that contains numeric

Case sensitive value

RETURN VALUES Integer EXAMPLE Tool.Var.SetVar “Difference” , Tool.Var.Num.Diff(“Total”, “SubTotal”)

Var.Num.GetVar(VarName) as Integer Var.Num.GetVar returns the numeric value assigned to the variable. Parameters

Description

Values

VarName

Name of variable that contains numeric

Case sensitive value

RETURN VALUES Integers SEE ALSO Var.Str.GetVar EXAMPLE Tool.Var.SetVar “NumMode” , Tool.Var.Num.GetVar (“Mode”)

Var.Num.Inc(VarName) Var.Num.Inc increments the integer stored in VarName by one. Parameters VarName

Description

Values

Name of variable that contains numeric

Case sensitive value

RETURN VALUES None SEE ALSO Var.Num.Dec

3-36

Page 57

EXAMPLE Tool.Var.Num.Inc“Count”

Var.Num.IsEqual(VarName, Value) as Boolean Var.Num.IsEqual determines if an integer stored in VarName is identical to Value. Parameters VarName

Description

Values

Name of variable that contains numeric

Case sensitive data Value

An integer that is compared to VarName

Integer

RETURN VALUES Boolean - True if the variable is equal to the value. SEE ALSO Var.Str.IsEqual EXAMPLE Tool.Var.Num.IsEqual(“Mode”, 2)

Var.Num.IsGreater(VarName, Value) as Boolean Var.Num.IsGreater indicates if data in VarName is greater than Value. Parameters

Description

Values

VarName

Name of a variable that contains numeric

Case sensitive data Value

An integer that is compared to VarName

Integer

RETURN VALUES Boolean - True if the variable is greater than Value EXAMPLE Tool.Var.Num.IsGreater(“Total”, 10000)

Var.Num.IsLess(VarName, Value) as Boolean Var.Num.IsLess indicates if an integer in VarName is less than the integer Value. Parameters VarName

Description

Values

Name of a variable that contains numeric

Case sensitive data Value

An integer that is compared to VarName

Integer

RETURN VALUES Boolean - True if the variable is less than Value

3-37

Page 58

EXAMPLE Tool.Var.Num.IsLess(“Total”, 100)

Var.Num.SetVar(VarName, Value) as Boolean Var.Num.SetVar assigns Value to the VarName. Parameters VarName

Description

Values

Name of a variable that contains numeric

Case sensitive data Value

An integer assigned to VarName

Integer

RETURN VALUES Boolean - True if the Value is assigned to VarName. EXAMPLE Tool.Var.Num.SetVar “Mode”, 4

Var.Num.Sum(VarName1, VarName2) as Integer Var.Num.Sum sums integers contained in VarName1 and VarName2. Parameters

Description

Values

VarName1

Name of variable that contains numeric

Case sensitive.

data VarName2

Name of variable that contains numeric

Case sensitive data

RETURN VALUES Integer - The sum of all parameters EXAMPLE Tool.Var.SetVar “Sum” , Tool.Var.Num.Sum(“LenFirstName”, “LenLastName”)

V r Str Var.Str Var.Str commands handle string data.

Var.Str.Concat(VarName1, VarName2) as String Var.Str.Concat concatenates the string contained in VarName2 to the end of the string contained in VarName1.

3-38

Page 59

Parameters

Description

Values

VarName1

Name of variable that contains string data

Case sensitive

VarName2

Name of variable that contains string data

Case sensitive

RETURN VALUES String EXAMPLE Var.Str.SetVar “Comma”, “,” Tool.Var.SetVar “Name” , Tool.Var.Str.Concat(“LastName”, “Comma”, “FirstName”)

Var.Str.GetVar(VarName) as String Var.Str.GetVar returns the string stored in VarName. Parameters

Description

Values

VarName1

Name of variable that contains string data

Case sensitive

RETURN VALUES String EXAMPLE Tool.Var.SetVar “Name” , Tool.Var.Str.GetVar(“LastName”)

Var.Str.IsEqual(VarName, Value) as Boolean Var.Str.IsEqual determines if string data contained in VarName is identical to Value. Parameters

Description

Values

VarName

Name of variable that contains string data

Case sensitive to compare with Value Value

A string that is compared to VarName

RETURN VALUES Boolean - True if equal EXAMPLE Tool.Var.Str.IsEqual “LastName”, “Jones”

3-39

Page 60

Var.Str.Left(VarName, Count) as String Var.Str.Left returns left number of characters from string data contained in VarName. Parameters

Description

Values

VarName

Name of variable that contains string data

Case sensitive

Count

Integer number of characters for extraction from the left edge of string data in VarName

RETURN VALUES String EXAMPLE Tool.Var.SetVar “Left” , Tool.Var.Str.Left(“LastName”, 3)

Var.Str.Right(VarName, Count) as String Var.Str.Right returns right most specified number of characters from the string data contained in VarName. Parameters

Description

Values

VarName

Name of variable that contains string data

Case sensitive

Count

Integer number of characters for extraction from the right edge of string data in VarName.

RETURN VALUES String EXAMPLE Tool.Var.SetVar “Right” , Tool.Var.Str.Right(“Name”, 2)

Var.Str.SetVar(VarName, Value) as Boolean Var.Str.SetVar assigns string data to VarName. Parameters VarName

Description

Name of variable created for storing string Case sensitive data

Value

String data for storing in VarName

RETURN VALUES Boolean - True if successful EXAMPLE Tool.Var.Str.SetVar “IsCardSwiped”, “Yes”

3-40

Values