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 4 of 10

TT Advantage Programmer's Guide, pages 31 to 40

Pages 31 to 40 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 31

'-----------------------------------------' Start of required code for scripting '

*** THIS MUST BE THE FIRST DIM or DECLARE IN THIS MODULE!!!!!

Public Tool As New clsTool '

^

'

You can change this Command Indicator name.

' Const PortNumber = 1 '

^

'

Change this to the port number where

' the POS device is connected

' ' End of required code for scripting '------------------------------------------

Sub main()

Declaring Variables In Script mode, there are four types of variables: String and three types of numeric. Variables are created with the Var command and sub-commands to SetVar.

Script Command Generation TT Advantage uses the Visual Basic interface to provide command options to developers as they construct Script commands. The illustration depicts a typical sequence: 1. Type Tool. A scroll box with available command options appears:

3-11

Page 32

2. Double click one of the command options. The selected command option appends to the end of the command under construction.

3. Repeat process until typing a period brings up no new sub-options.

4. Type a space after the last sub-option to make parameters easier to see. A parameter list for the command, if one exists, appears with the first parameter highlighted.

3-12

Page 33 read from a scan by OCR; it may hold reading errors

5. Type in the parameters until the parameter list is exhausted.

‘| drawn on the pad

End Sub

Private Sub Form Load{)

Tool.DISP.Box 40, 20 Box(Left As integer, Top As integer, Width As Integer, Height As Integen |

End Sub

3-13

Page 34

TT Advantage Objects, Properties and Methods (Script Mode) The organization of the objects, properties and methods for TT Advantage are displayed in the chart below:

TOOL

Disp Box ............................................................................................. 31 Clear........................................................................................... 31 DeleteAllControls........................................................................ 31 DrawLine .................................................................................... 32 Frame......................................................................................... 32 SetColor ..................................................................................... 32 SetFont....................................................................................... 33 Text ............................................................................................ 33 Getpin......................................................................................... 33 Mkeypin ...................................................................................... 34

Script DoNothing .................................................................................. 34 GotoRoutine ............................................................................... 35 GotoScreen ................................................................................ 35 GotoVar ...................................................................................... 36 IfFalse ........................................................................................ 36 IfTrue.......................................................................................... 37 Pause ......................................................................................... 38 StopScript................................................................................... 38

Sig Clear........................................................................................... 38 Convert....................................................................................... 39

3-14

Page 35

GetCount .................................................................................... 39 Height ......................................................................................... 39 InchesHigh ................................................................................. 40 InchesWide ................................................................................ 40 IsEmpty ...................................................................................... 40 Save ........................................................................................... 41 Width .......................................................................................... 41

Sound Bell ............................................................................................. 42 Tone ........................................................................................... 42

Stopwatch Continue ..................................................................................... 43 GetTimer .................................................................................... 43 Pause ......................................................................................... 43 Start............................................................................................ 44

Txtbox IsEmpty ...................................................................................... 44 Load ........................................................................................... 45 Save ........................................................................................... 45 SendKeys ................................................................................... 46

Unit Model.......................................................................................... 46 Version ....................................................................................... 46

Var DeleteVar ................................................................................... 47 FindVar....................................................................................... 47 SetVar ........................................................................................ 48

3-15

Page 36

Bin SetVar ........................................................................................ 48 ToBase....................................................................................... 48 ToHex......................................................................................... 49

Num Dec ............................................................................................. 49 Diff .............................................................................................. 50 GetVar ........................................................................................ 50 Inc............................................................................................... 50 IsEqual ....................................................................................... 51 IsGreater .................................................................................... 51 IsLess ......................................................................................... 51 SetVar ........................................................................................ 52 Sum ............................................................................................ 52

Str Concat ........................................................................................ 52 GetVar ........................................................................................ 53 IsEqual ....................................................................................... 53 Left ............................................................................................. 53 Right ........................................................................................... 54 SetVar ........................................................................................ 54

3-16

Page 37

Disp The DISP commands relate to the visual aspects of the interactive point of sale scripts. The DISP commands execute changes in the visual displays that occur during script operations.

Disp.Box(Left, Top, Width, Height) Disp.Box draws a filled box on the screen. Parameters

Description

Values

Left

Integer, distance from left edge of screen

Range: 0 – 319

Top

Integer, distance from top edge of screen

Range: 0 – 239

Width

Integer, width of box

Range: 0 – 319

Height

Integer, height of box

Range: 0 – 239

RETURN VALUES None SEE ALSO Disp.Frame EXAMPLE Tool.Disp.Box 10, 10, 200, 140

Disp.Clear Disp.Clear makes all objects on the screen invisible Parameters

Description

Values

None

RETURN VALUES None EXAMPLE Tool.Disp.Clear

Disp.DeleteAllControls Disp.DeleteControls removes all objects from the screen. Parameters

Description

Values

None

RETURN VALUES None

3-17

Page 38

EXAMPLE Tool.Disp.DeleteAllControls

Disp.DrawLine(X1, Y1, X2, Y2) Disp.DrawLine draws a line on the screen. Parameters X1, Y1

X2,Y2

Description

Values

Integers representing coordinates at the

X1: 0 to 319 start of a line

Y1: 0 to 239

Integers representing coordinates at the

X2: 0 to 319 end of a line

Y2: 0 to 239

RETURN VALUES None EXAMPLE Tool.Disp.DrawLine 20, 20, 200, 20

Disp.Frame(Left, Top, Width, Height) Disp.Frame draws unfilled rectangles on screen. Parameters

Description

Values

Left

Integer, distance from left edge of screen

Range: 0 - 319

Top

Integer, distance from top edge of screen

Range: 0 - 239

Width

Integer, width of frame

Range: 0 - 319

Height

Integer, height of frame

Range: 0 - 239

RETURN VALUES None SEE ALSO Disp.Box EXAMPLE Tool.Disp.Frame 10,10,50,50 This will draw a small frame on top left hand corner of the PadScreen

Disp.SetColor(Color) Disp.SetColor sets the current color. Parameters

Description

Values

Color

PadColors

White or Black

3-18

Page 39

RETURN VALUES None EXAMPLE Tool.Disp.SetColor Black

Disp.SetFont(FontType) Disp.SetFont sets the current font. Parameters

Description

Values

FontType

RETURN VALUES None EXAMPLE Tool.Disp.SetFont Font6x8

Disp.Text(Left, Top, Text) Disp.Text displays text beginning at coordinates Left(X), Top(Y). Parameters

Description

Values

Left

Integer, distance from left edge of screen

0 - 319

Top

Integer, distance from top edge of screen

0 - 239

Text

String

RETURN VALUES None EXAMPLE Tool.Disp.Text 20, 40, “Hello”

3-19

Page 40

Disp.Getpin (Title, Account) Disp.Getpin displays a DUKPT PIN entry prompt and returns a standard binary DUKPT PIN. Parameters

Description

Values

Title

Optional, title message

String value to display as the title of the screen

Account

Required, account number as a string of ASCII digits.

RETURN VALUES This command encrypts a pin returned as a binary value. If an error occurs zero length result is returned. A canceled entry also returns a zero length result. EXAMPLE Tool.Var.SetVar "PIN", Tool.DISP.GetPin("Enter Pin", "764012345678909")

Disp.Mkeypin (Title, Account,Skey,MkeyID) Disp.Mkeypin displays a PIN entry prompt and returns a standard Masterkey PIN. Parameters

Description

Values

Title

Optional, title message

String value to display as the title of the screen

Account

Required, account number as a string of

9-19 ASCII digits

ASCII digits. Skey

Transaction/Session key

16 ASCII hex digits

MkeyID

Stored master key ID

0-9

RETURN VALUES This command encrypts a pin returned as a binary value. Example Tool.Var.SetVar "PIN", Tool.DISP.Mkeypin("Enter Pin", "764012345678909", "0123456789ABCDEF", "0")

Script SCRIPT commands handle special logic that deals with scripts, such as navigation, and branching commands.

3-20