Technical Notes |
|
This technical note explains how to configure Reflection 2007 to automatically run certain actions when specified text is displayed in the host terminal session. These actions are configured in a VBA (Visual Basic for Applications) event handler. This information may be of particular interest to former users of EXTRA! X-treme that used HotSpots configured to "auto-invoke" actions.
In both EXTRA! X-treme and Reflection for IBM 2007, you can configure HotSpots that enable you to click host text to send a terminal key function (for example, click "PF1" to send PF1). In EXTRA! X-treme, you could also configure actions to be automatically invoked when the HotSpot text is displayed in the host session. In Reflection for IBM 2007, such automatic actions must be configured in a VBA event instead of HotSpots, as explained below.
In Reflection for IBM 2007, events are exposed by the Reflection IbmScreen object. Follow these steps to create a VBA event handler with your desired code:
Private Sub IbmScreen_NewScreenReady(ByVal sender As Variant)End sub |
The NewScreenReady event will fire every time a new host screen is displayed in the terminal.
If ThisIbmScreen.GetText(1, 66, 14) = "APPLID CICS23A" And _ ThisIbmScreen.GetText(10, 11, 14) = "Userid . . . ." Then 'a particular screen is identified...do something...End If |
For more information on VBA programming, see Technical Note 2183.