Using Type method

Top  Previous  Next

The Type method can be used to send key sequences to the mainframe starting from the current cursor position.

 

VB

tnxxxx.Type (Keys As String)

 

Delphi

tnxxxx.Type (Keys : String);

 

By using special codes you can send several special keys. These codes consist of an escape character ("@") and a mnemonic code that corresponds to the supported function.

 

Type method can also make entered data to be sent along with an AID key (Attention Identifier key), avoiding the use of Press method.

 

The following table lists the functions keys and its corresponding codes.

 

 

Code Value

Meaning

@A@Q

Attention

@<

Backspace

@B

BackTab (Left Tab)

@C

Clear

@E

Enter

@F

Erase Field

@A@Q

Sys Request

@T

Tab (Right Tab)

@x

PA1

@y

PA2

@z

PA3

@1

PF1

@2

PF2

@3

PF3

@4

PF4

@5

PF5

@6

PF6

@7

PF7

@8

PF8

@9

PF9

@a

PF10

@b

PF11

@c

PF12

@d

PF13

@e

PF14

@f

PF15

@g

PF16

@h

PF17

@i

PF18

 

Examples:

 

 VB:

 Private Sub SendUserAndPassword()

        '@T is translated to TAB key

    telnet.Type(userId+"@T"+password)

    telnet.PressAndWait(Enter)

 End Sub

 

 Delphi:

 procedure SendUserAndPassword(userId, password : String);

 begin

        // @T is translated to TAB key

    tnb3270.Type(userId+'@T'+password);

    tnb3270.PressAndWait(Enter);

 end;