Skip to main content

Hi, i am trying to identify the selected text background color from the rumba green screen.  Am using rumba 7.5.2 version.

please advise.


#Rumba

Hi, i am trying to identify the selected text background color from the rumba green screen.  Am using rumba 7.5.2 version.

please advise.


#Rumba
Basically i am looking for the access to the rumba screen properties (table control) from the script. i think that would help me to know the row background /foreground color!! Any thoughts on how to achieve this?

Hi, i am trying to identify the selected text background color from the rumba green screen.  Am using rumba 7.5.2 version.

please advise.


#Rumba
Hi jayk,

unfortunately I'm not aware of any method of reading the background/foreground colours which are physically visible in a terminal field in Rumba. The closest you may get the this would be to use eHLLAPI to read the Presentation Space with the EAB parameter enabled in your SetSessionParameters call, then you could get the foreground colour which the host is setting, and blink/reverse video/underline/normal attributes. This in conjunction with checking the Field Attribute (Query Field Attribute Function 14), should allow you to figure out both the foreground and background colours visible in the field on screen in Rumba assuming you know how the colour mapping are setup in the session profile.

So e.g.
1. Call Function 9 and add "EAB" to the Parameter list
2. Use Function 1 to Connect to your Session shortname
3. Call Function 5 or Function 8 to copy the bit of the presentation space you are interested in. (remember as you have EAB's on then you length will need to be double the usual length).
4. Once you have you string check the relevant location in the string and extract the EAB for the location you are interested in.
5. Use Function 14 to Query the Field Attribute for your screen cursor location.

As you can see it's is not a trivial task, compounding that is the fact that Rumba 7.5.2 is no longer support and has never been supported (or tested) on any currently supported version of Microsoft Windows.

If this is not a general requirement and is only needed for a specific desktop to handle a specific scenario, then you may wish to consider using out Reflection Desktop product. Reading the background for a given screen coordinate is much less complex with that product and can be read using COM or .NET.

Hope that helps,
Tom

Hi, i am trying to identify the selected text background color from the rumba green screen.  Am using rumba 7.5.2 version.

please advise.


#Rumba

Hi jayk,

you have the option to read the color from your RUMBA Profile  wdm , wda  or wdu Profile.
It's the color that was last used when the profile was saved.
The ProfEdit.Dll is very helpful when you want to  get or set information from the Rumba Profile. (The dll can be found under... RUMBA\\System\\profedit)

Sub Macro()
Dim Profedit As Object
Dim bgcolor As String

Set Profedit = CreateObject("ProfileEditor.ProfileEditor.1", "")
Profedit.ProfileName = "c:\\temp\\test.wdm"
bgcolor = Profedit.MainframeDisplay.BackColor
MsgBox (bgcolor) 

End Sub

The Color is provided as an OLE_COLOR value.
The default is black (&H8000000F). Listed below are examples of some common colors and their RGB values in decimal and hex.

Color RGB value - decimal RGB value - hex

Black   0                0x000000
Red     255             0x0000FF
Green  65280         0x00FF00
Blue    16711680    0xFF0000
Yellow  65535         0x00FFFF
Pink    16711935     0xFF00FF
Cyan   16776960     0xFFFF00
White  16777215     0xFFFFFF

 

With Rumba 9.4.1 and newer you can use VBA to read the color at any time

Sub GetBgColor()

apiDesc = Session1.GetRDEObjectDescriptor()
Set api = GetObject(apiDesc)
bgcolor = api.BackColor 'OLE Color
MsgBox (bgcolor)

End Sub

 

cheers