hi,
the following code is from the Help files but it doesn't always seem to return the correct session.
for example,if i open 4 consecutive sessions and i run the code, session 4 would show as the active session.
then if i do one transaction (sendkey) in session, and run the code again, it would still show session 4 as the active session.
only after several transactions (sendkeys) would the code show correctly as session 1.
the sendkey can be an enter or pf1..etc...
i'm using myExtra Enterprise 7.11v
any ideas?
thanks
zach
the following code is from the Help files but it doesn't always seem to return the correct session.
for example,if i open 4 consecutive sessions and i run the code, session 4 would show as the active session.
then if i do one transaction (sendkey) in session, and run the code again, it would still show session 4 as the active session.
only after several transactions (sendkeys) would the code show correctly as session 1.
the sendkey can be an enter or pf1..etc...
i'm using myExtra Enterprise 7.11v
any ideas?
thanks
zach
Code:
Sub main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject("EXTRA.System")
' Assumes an open session
Set Sess = Sys.ActiveSession
SessionName$ = Sess.Name
MsgBox "The active session is " + SessionName$ + "."
End Sub