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

Reflection 2011 alternative to xstatus in EXTRACOM

Status
Not open for further replies.

kdvjr

Technical User
Oct 5, 2010
2
0
0
US
I've recently upgraded to Reflection 2011 and am in the process of writing a new macro for work.

Previously I would write macros using the Extra! editor and call excel vba for forms, interacting with other apps, etc. This project, however, is too complex for me to use the Extra! editor (it's still supported by the new Reflection) and so I'm writing the entire thing in Excel VBA and taking control of the session through Excel.

The problem is, when I do it that way the oia.xstatus <> 0 that I normally use to manage screen loads doesn't work. I'm using EXTRACOM objects in VBA which still have the method, but according to Reflection documentation, xstatus no longer works.

Are there any good alternatives to xstatus? Using GetString and looping until a specific string appears works for part of my application, but not for everything.

Would it be easier to use an Attachmate_Reflection_Object to call the session?
 
Hello,

I'm using Reflection 2008. My Documentation says:

"Reflection 2008 doesn't support EXTRA! macros and COM applications that contain certain methods and properties from the classes listed in this section."

It goes on to list the ExtraOIA class, and says XStatus has no operation. I think the documentation must be talking about Reflection objects only because it still works with EXTRACOM, at least for 2008.

What references are you using in VBA? Try just EXTRACOM and make sure to get rid of any MISSING references.

I just added a line and a break to my function to test and it is definitely working.

Code:
Function waiter()
    Do While Sess0.Screen.OIA.XStatus <> 0
    foo = Sess0.Screen.OIA.XStatus
    DoEvents
    Loop
End Function

I'm setting my objects like this:

Code:
Public System As EXTRACOM.ExtraSystem
Public Sessions As EXTRACOM.ExtraSessions
Public Sess0 As EXTRACOM.ExtraSession

Set System = New EXTRACOM.ExtraSystem
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession
 
Thanks for the reply-

You're right- I did some testing and the OIA.XStatus wait function still works with EXTRACOM.

It turns out that I was just interacting with our mainframe slightly earlier in the logon process than I had in the past and for that section the OIA.XStatus returned 0 before the screen was actually ready. Once I got logged in OIA.XStatus worked as before.
 


I have found that the WaitForCursor is very reliable.
Code:
do until scrn.waitforcursor(r, c)
  DoEvents
loop





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