Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run an app after user tabs to a specific row and column on a screen

Status
Not open for further replies.

PBNC

IS-IT--Management
Jul 23, 2009
2
US
Greetings,
I would like to create and automatically run a macro that executes another program once a user tabs to a specific row and column of a mainframe screen being emulated within Extra Attachmate 6.4. Can I record a macro capturing the tabbing to the field and then create a function to open the other app? If yes, how do I make sure it runs once the user reaches the specified row and column on that particular screen?

Is there a canned script or macro for something like this?

Ultimately, I would reuse this to help consolidate some desktop functionalities.

Thanks in advance for any and all assistance.

PB from NC.
 
Here is what I have so far:

Sub Main
Dim Row As Integer
Dim Col As Integer
Dim System As Object
Dim Session as Object


Dim D102Screen As Object


' Get the main system object
Set System = CreateObject("EXTRA.System")
If (System is Nothing) Then
Msgbox "Could not create the EXTRA! System object. Aborting macro playback.", 48, "EndLine"
Stop
End If

' Get the necessary session Object
Set Session = System.ActiveSession

If (Session is Nothing) Then
Msgbox "Could not create the Session object. Aborting macro playback.", 48, "EndLine"
Stop
End If

' Get the screen object
Set D102Screen = System.ActiveSession.Screen

' Get the current cursor location
Row% = D102Screen.Row
Col% = D102Screen.Col

If Row = 15 and Col = 16 Then
MsgBox "Opening QAS Address software."
AppActivate "C:\Program Files\QAS\QAS Pro\QUSHOWN.exe QAPROWN 1 Session1*"
Else
MsgBox "Error opening QAS Address software. Contact the system administrator."

End If

End Main
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top