Edit-Copy and Edit-Paste in Macros
PASSPORT PC to Host, PASSPORT Web to Host
TN3270, TN5250, VT, SCO ANSI, Wyse 60
In previous versions of PASSPORT I was able to use the SendHostKeys command in a macro to send Edit-Copy and Edit-Paste to the host screen. Since I upgraded to version 2004, these no longer work. How can I resolve this?
SendHostKeys is no longer supported for sending Edit-Copy or Edit-Paste, since these are menu commands rather than host keys. However, the PASSPORT Object interface may be utilized to issue these commands.
Below is a sample PASSPORT macro that copies the currently selected text, moves the cursor, then pastes the text to the new location:
Sub ZMain Set Sys = CreateObject("PASSPORT.System") 'selects the currently active session Set Sess = Sys.ActiveSession 'selects the screen object Set MyScreen = Sess.Screen 'selects the area (Start Row, End Row, Start Column, End Column) Set MyArea = MyScreen.Area(1, 1, 1, 24) MyArea.Select MyScreen.Copy 'modify the row and column below to move cursor to another location MyScreen.MoveTo 24, 7 MyScreen.Paste End Sub |
In order to make use of the PASSPORT Object Layer, you must be using a license code that is enabled for it.
You will also need 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, edit, copy, paste