Move Data Between Sessions
PASSPORT PC to Host, PASSPORT Web to Host
TN3270, TN5250, VT, SCO ANSI, Wyse 60
When using a macro, can I move data or text from one open session to another?
This is possible using the PASSPORT Object API (PASSOBJ.DLL).
Below is a sample PASSPORT macro that copies an area of text from one session, pastes it into a specific area of a second session, then issues an ENTER command:
Sub ZMain() Dim Sys, Sess, MyScreen, MyArea Set Sys = CreateObject("PASSPORT.System") Set Sess = Sys.ActiveSession Set MyScreen = Sess.Screen 'The following code will copy a selected area of the screen 'on the active session. Set the screen parameters as follows: '(StartRow,StartCol,EndRow,EndCol) Set MyArea = MyScreen.Area(4,3,4,26) MyArea.Select MyArea.Copy
'The following code will activate the next session: Set Sess = Sys.Sessions.JumpNext Set MyScreen = Sess.Screen 'Select the screen area to paste into (StartRow,StartCol,EndRow,EndCol) MyScreen.Select 24,3,24,27 MyScreen.Paste MyScreen.SendKeys("<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.
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
macro, move, data, sessions, copy, paste