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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if session already is opened and visible true..

Status
Not open for further replies.

2009luca

Programmer
Jul 27, 2013
222
IT
Based the code:

Option Explicit
Public oSystem As ExtraSystem
Public oSessions As ExtraSessions
Public oSess As ExtraSession
Public oScrn As ExtraScreen
Sub TEST_EXTRA()

Set oSystem = CreateObject("Extra.System")

Set oSess = oSystem.Sessions.Open("C:\Program Files\Attachmate\EXTRA! X-treme9\Sessions\0894_B.edp")

With oSess
.Visible = True
.WindowState = xNORMAL
End With

Set oScrn = oSess.Screen

Debug.Print oScrn.GetString(9, 21, 5)

oScrn.PutString "CICSL", 9, 42

oScrn.SendKeys ("<Enter>")

End Sub

how to check if session _B is just opened and visible =true before:

Set oSess = oSystem.Sessions.Open("C:\Program Files\Attachmate\EXTRA! X-treme9\Sessions\0894_B.edp")

How to?
Tks
 
Hi,

Loop through each session in the Sessions collection.
Code:
For each oSess in oSystem.Sessions
   If [highlight #FCE94F]oSess.......[/highlight] Then
      Set oSess = oSess
      Exit For
   End if
Next

The expression [highlight #FCE94F]oSess.......[/highlight] you'll have to figure out. I don't have access to the Object Model, Properties & Methods. You need to find the property that returns the session connection string and match it to the session connection string you have in your code.


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top