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

Automate a second reflections session, from another session.

Automate a second reflections session, from another session.

(OP)

Hello,
First off, I'm so glad that I've found this community. I am hoping that someone can give me a hand doing identifying existing reflection sessions.

I'm able to open a new instance of reflections and then automate that using this code.

CODE

Public Sub SeperateAOM()
Dim Ref As Reflection.Session
Dim refAom As Reflection.Session
Dim refBBP As Reflection.Session


Dim ReflectionReGIS As Object
Set ReflectionReGIS = GetObject("RIBM")
'Declare the Reflection Object
Dim Ribm As Reflection.Session

'Create a new instance of Reflection for IBM
Set Ribm = CreateObject("ReflectionIBM.Session")
Ribm.OpenSettings rcSettings, "Session.rsf"
'Make Reflection visible
Ribm.Visible = True

'Use the Caption property to change the Reflection window title
Ribm.Caption = "Remote Terminal"

Ribm.TransmitANSI ("Works")

Ribm.RunExternalMacro "Sessions.rsf", "TimeLoopWait", ""

End Sub 


But what I'm trying to do is loop through all open versions of reflections, and then enter some information in each one.


I've seen some solutions using the attachmates EXTRA! program, but I can't get any of those to work with the tools in the reflections reference library.


I would really appreciate any kind of tips or tricks, I've been working in reflections for a few months now and while its very similar to other mainframe emulators I've worked on, it does have its own... attitude in some ways.


RE: Automate a second reflections session, from another session.

HI,

...and a second welcome to Tek-Tips.

I hope we have some Reflections users. I am a former (retired) Extra user.

I'd start looking at the Sessions object. Loop through each Session in Sessions...

CODE

Dim oSess as Object

For Each oSess in System.Sessions

Next 

Of course a System object must be set.

Skip,

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

RE: Automate a second reflections session, from another session.

(OP)
Skip I'm still having a problem.

Using the syntax provided by attachmate, I can't get this to work.. Here is their example of opening another session.

CODE

Sub CreateReflectionObject ()

'Declare the Reflection Object
Dim Ribm As Reflection.Session

'Create a new instance of Reflection for IBM
Set Ribm = CreateObject("ReflectionIBM.Session")

'Make Reflection visible
Ribm.Visible = True

'Use the Caption property to change the Reflection window title
Ribm.Caption = "Automation Demonstration"

End Sub 



Any thoughts? Every example I see of looping or for each reflections session is coming from the extra! reference library.

RE: Automate a second reflections session, from another session.

I'm working in the dark here, never having used Reflection. So these are guesses.

With multiple sessions do you have multiple instances of Reflection where one Session is not reflected (pun intended) in another?

Must you start with one Session and then programmatically add Sessions using the same Application object root?

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