The PressAndWait method |
Top Previous Next |
The PressAndWait method acts like Press method, but it blocks the code execution waiting until the system gets unlocked.
VB tnxxxx.PressAndWait (aidKey as AidKey) tnxxxx.PressAndWait (aidKey As String)
The following graphic shows the sequence of actions corresponding to the synchronous PressAndWait method:
Examples:
VB: Private Sub cmdLogin_Click() ' this code sets userId in Field located at Row 10 Column 2 telnet.EditFields["R10C2"].Data = "puser" ' this code sets the password in Field located at Row 12 Column 2 telnet.EditFields["R12C2"].Data = "k2156" ' this code sends the ENTER Attention Identifier Key along with all modified EditFields telnet.Press("Enter") End Sub
Delphi: procedure TForm1.LoginClick(Sender:TObject); begin // this code sets userId in Field located at Row 10 Column 2 tnb3270.EditFields['R10C2'].Data := 'puser'; // this code sets the password in Field located at Row 12 Column 2 tnb3270.EditFields['R12C2'].Data := 'k2156'; // this code sends the ENTER Attention Identifier Key along with all modified EditFields tnb3270.Press('Enter'); end;
|