Skip to main content

I'm in classic mode for Reflection for Unix and OpenVMS.  I'm trying to access the R2WIN object from my screen reader (NVDA).  I'm trying to assign a variable to the already open R2WIN  object and be able to change the cursor type and window state.  How can i get to the R2WIN object?

 

ReflectionObj=comHelper.getActiveObject("Attachmate_Reflection_Objects_Framework.ApplicationObject", dynamic = True)

myTerminalWin = ReflectionObj.Application.GetObject("r2win")

 


#Reflection

I'm in classic mode for Reflection for Unix and OpenVMS.  I'm trying to access the R2WIN object from my screen reader (NVDA).  I'm trying to assign a variable to the already open R2WIN  object and be able to change the cursor type and window state.  How can i get to the R2WIN object?

 

ReflectionObj=comHelper.getActiveObject("Attachmate_Reflection_Objects_Framework.ApplicationObject", dynamic = True)

myTerminalWin = ReflectionObj.Application.GetObject("r2win")

 


#Reflection

Hi , 

If this has still not been resolved, our Reflection team recommends starting with the following.

----------------------------------------------------------------------------------------------------------

Micro Focus does not have any examples using python as a programming language to access the Reflection Desktop host session.  You cannot access the R2WIN.EXE module directly as this module (used for UNIX and OpenVMS sessions) is just a communication engine and does not expose an API.  You have to access the UNIX and OpenVMS session via the Reflection Workspace and the API provided for the Workspace.

Please take a look at the following documentation for the Reflection Desktop 16.2 .NET API:

http://docs.attachmate.com/reflection/16-2/net-prog-guide/

In this documentation, you should find information on how to access the Reflection Objects, specifically under:

http://docs.attachmate.com/reflection/16-2/net-prog-guide/connect-to-session.html

You will need to provide a Reference in your python code to the Reflection assemblies, specifically the following two:

        Attachmate.Reflection.Framework

        Attachmate.Reflection.Emulation.OpenSystems

Then you should be able to do a CreateApplication() type call in python to get the Reflection Workspace via the “MyWorkspace”, default channel name. In Classic Mode the Reflection Workspace and the Reflection Host session are basically one and the same since you are running in Single Document Interface (SDI) mode. Once you have created a View to the session then you can change the cursor and window state.

Another option to change the cursor and window state is to use the VBA macro language documented here:

http://docs.attachmate.com/reflection/16-2/vba-prog-guide/#getstarted.html

Here are references to setting cursor shapes in VBA:

http://docs.attachmate.com/reflection/16-2/vba-prog-guide/Attachmate.Reflection.Objects.Emulation.OpenSystems~Attachmate.Reflection.Objects.Emulation.OpenSystems.CursorShapeOption.html?highlight=cursor,

Here is information on setting Window state from VBA:

http://docs.attachmate.com/reflection/16-2/vba-prog-guide/Attachmate.Reflection.Objects~Attachmate.Reflection.Objects.UserInterface.Frame~WindowState.html?highlight=window,state,

A simple Reflection Startup macro could be run to set the cursor shape at session startup:

https://www.attachmate.com/documentation/reflection-desktop-v16/rdesktop-guide/data/record-andrun-macros-howto.htm#startup_macro_pr

Or you could tie the macro to a Reflection Event triggered by a user action:

https://docs.attachmate.com/reflection/16-2/vba-prog-guide/using-events.html