Maintain Copy Selection Through Multiple Screens
.ZMC
This macro will copy the text from the specified area of the screen, advance to the next screen (using PF12), then perform the Edit-Copy Append command. The Edit-Copy Append is repeated the number of times specified in the For Next loop statement.
Sub ZMain()
MyArea = SelectArea (1, 1, 24, 80)
ExecMenuCmd ("Edit-Copy")
For i = 1 to 10
SendHostKeys("<PF12>")
Wait(2)
MyArea = SelectArea (1, 1, 24, 80)
ExecMenuCmd ("Edit-Copy Append")
Next
End Sub |
Follow the steps below to use the sample macro:
Copy the above sample macro code, paste into Notepad or any text editor then save with a .ZMC extension.
Modify the MyArea = SelectArea statements to include the area of the screen to be copied using the format (row1, column1, row2, column2); the sample is configured to copy the entire MOD2 (24 x 80) screen area.
If necessary, modify the For i = 1 to 10 statement to loop as many times as required.
If the macro runs slower than expected, you may be able to modify the Wait(2) statement to Wait(1) or even eliminate it altogether, depending on the speed of your host.