Skip to main content

Hey gang,
We are using Micro Focus Reflection Desktop Pro version: 16.0 SP-1 (16.0.308.0).

I am unable to use the following code to set CAPSLOCK.

Sub ExternalRecorded1()
' Generated by the Reflection Macro Recorder on 08-18-2017 12:26:55.56.
' Generated by Micro Focus Reflection Desktop Pro (16.0.308.0).

Dim osCurrentScreen As Screen
Dim osCurrentTerminal As Terminal
Dim returnValue As Integer

Const NEVER_TIME_OUT = 0

Dim LF As String ' Chr(rcLF) = Chr(10) = Control-J
Dim CR As String ' Chr(rcCR) = Chr(13) = Control-M

Set osCurrentTerminal = ThisFrame.SelectedView.control
Set osCurrentScreen = osCurrentTerminal.Screen

LF = Chr(10)
CR = Chr(13)


osCurrentScreen.CapsLock = True


Exit Sub

' Recording stopped at 12:27:00.13.

End Sub



Does anyone have a solution and/or is this a known "bug" in the version of Desktop Pro?

Thanks in advance...


#Reflection
#Desktop

Hey gang,
We are using Micro Focus Reflection Desktop Pro version: 16.0 SP-1 (16.0.308.0).

I am unable to use the following code to set CAPSLOCK.

Sub ExternalRecorded1()
' Generated by the Reflection Macro Recorder on 08-18-2017 12:26:55.56.
' Generated by Micro Focus Reflection Desktop Pro (16.0.308.0).

Dim osCurrentScreen As Screen
Dim osCurrentTerminal As Terminal
Dim returnValue As Integer

Const NEVER_TIME_OUT = 0

Dim LF As String ' Chr(rcLF) = Chr(10) = Control-J
Dim CR As String ' Chr(rcCR) = Chr(13) = Control-M

Set osCurrentTerminal = ThisFrame.SelectedView.control
Set osCurrentScreen = osCurrentTerminal.Screen

LF = Chr(10)
CR = Chr(13)


osCurrentScreen.CapsLock = True


Exit Sub

' Recording stopped at 12:27:00.13.

End Sub



Does anyone have a solution and/or is this a known "bug" in the version of Desktop Pro?

Thanks in advance...


#Reflection
#Desktop
We might have a bug here. Fortunately I can see a simple way around the problem. Here is what I have observed.

1. Set the CapsLock property to True using a macro:

Sub capslocktest()    
ThisScreen.CapsLock = True
End Sub


2. When running this, you can see the capslock indicator on the keyboard turn on. Typing will be upper case.

3. Press the capslock key on the keyboard to turn it off. Typing is now lower case.

4. Run the same little macro again to make capslock = true. Capslock keyboard indicator does not come on, and typing is still lower case.

Hmmm.

I have found that if you set the capslock property to false before setting it to true, this will avoid the problem where manually pressing the capslock key interferes with setting this in code:

Sub capslocktest()
ThisScreen.CapsLock = False
ThisScreen.CapsLock = True
End Sub


Hope that will work for you too. I will report this issue to our Customer Care department so development staff can eventually look into the matter.

-vfast:eek:

We might have a bug here. Fortunately I can see a simple way around the problem. Here is what I have observed.

1. Set the CapsLock property to True using a macro:

Sub capslocktest()    
ThisScreen.CapsLock = True
End Sub


2. When running this, you can see the capslock indicator on the keyboard turn on. Typing will be upper case.

3. Press the capslock key on the keyboard to turn it off. Typing is now lower case.

4. Run the same little macro again to make capslock = true. Capslock keyboard indicator does not come on, and typing is still lower case.

Hmmm.

I have found that if you set the capslock property to false before setting it to true, this will avoid the problem where manually pressing the capslock key interferes with setting this in code:

Sub capslocktest()
ThisScreen.CapsLock = False
ThisScreen.CapsLock = True
End Sub


Hope that will work for you too. I will report this issue to our Customer Care department so development staff can eventually look into the matter.

-vfast:eek:
Thanks for the suggestion vfast. I will try it out and report back whether it works or not on our system. I thought I was crazy because my original code seemed to work on occassion, now I see that it might be a bug (or definitely is a bug) and it makes me feel sane again. Wish I had a better way of reporting bugs rather than going through my computer department. They don't see the urgency in these "nuisance" problems. They just wonder why I would even bother...

Thanks for the suggestion vfast. I will try it out and report back whether it works or not on our system. I thought I was crazy because my original code seemed to work on occassion, now I see that it might be a bug (or definitely is a bug) and it makes me feel sane again. Wish I had a better way of reporting bugs rather than going through my computer department. They don't see the urgency in these "nuisance" problems. They just wonder why I would even bother...
The work-a-round that vfast has provided does work. Need to first set CAPSLOCK to false, then set it to TRUE. Works well enough for me. THANKS !!!!:)

The work-a-round that vfast has provided does work. Need to first set CAPSLOCK to false, then set it to TRUE. Works well enough for me. THANKS !!!!:)
After additional testing what I find is that each successive time I run this Macro, the CAPSLOCK function toggles ON or OFF. This is definitely screwed up and does not work as expected. BUMMER>....:confused: