Send Keystrokes to an Active Session
PASSPORT PC to Host, PASSPORT Web to Host
TN3270, TN5250, VT, SCO ANSI, Wyse 60
Programmers may have a need to send keystrokes to an active PASSPORT session from an external application.
Beginning in version 2002 of PASSPORT, the terminal emulation contains a new object layer (PASSOBJ.DLL) that allows programmers to create a COM object that may be used to send keystrokes to an active PASSPORT session.
Below is sample Visual Basic code that sends a text string to a specific PASSPORT session, followed by the ENTER key:
Sub Main() Set objPassport = CreateObject("PASSPORT.System") num =objPassport.Sessions.Count if num > 0 then for i=1 to num if objPassport.Sessions.Item(i) = "MySession" then set ActiveSess = objPassport.Sessions.Item(i) end if Next end if ActiveSess.Activate ActiveSess.Screen.WaitHostQuiet(gkHostSettleTime) ActiveSess.Screen.SendKeys"MyText<ENTER>" End Sub |
In order to make use of the PASSPORT Object Layer, you must be using a license code that is enabled for it.
It is important to note that, in order to make use of the PASSPORT Object Layer, the latest Microsoft Visual Basic run-time files must be installed and registered on any workstation that will utilize it. For more information or to download the run-time files, please visit the following page on the Microsoft website: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q192461
api, object, screen, application, integration, keystrokes, automation