INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

check if session already is opened and visible true..

check if session already is opened and visible true..

(OP)
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

RE: check if session already is opened and visible true..

Hi,

Loop through each session in the Sessions collection.

CODE

For each oSess in oSystem.Sessions
   If oSess....... Then
      Set oSess = oSess
      Exit For
   End if
Next 

The expression oSess....... 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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close