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!

Automate a second reflections session, from another session.

Status
Not open for further replies.

jrud

Programmer
May 24, 2016
4
US

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.


 
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,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
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.
 
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,
[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