Skip to main content
Hello team,

I am in a process to migrate Extra! code to Reflection.

In Extra I am using the following function to pass Enter to the mainframe screen
SendKeys("<ENTER>")

I can;t find how can I replace it with SendControlKey 
SendControlKey ("<Enter>") - fails in the code
SendControlKey (13) - fails on the screen

Can you help me how to use it in Lotus Script please ?

Thanks,
Alon


#Script
#Reflection
Hello team,

I am in a process to migrate Extra! code to Reflection.

In Extra I am using the following function to pass Enter to the mainframe screen
SendKeys("<ENTER>")

I can;t find how can I replace it with SendControlKey 
SendControlKey ("<Enter>") - fails in the code
SendControlKey (13) - fails on the screen

Can you help me how to use it in Lotus Script please ?

Thanks,
Alon


#Script
#Reflection

Hello Alon,
within Reflection Desktop, you can utilize SendControlKey(ControlKeyCode_Transmit).
Please refer to our VBA Documentation available at https://www.microfocus.com/documentation/reflection-desktop/18-0-1/vba-guide/getstarted.html.
This documentation provides a quick start and elaborates on the concept of keys.
By utilizing the Macro Recorder and inspecting the generated VBA code, you'll discover the Keys you need.


Hello Alon,
within Reflection Desktop, you can utilize SendControlKey(ControlKeyCode_Transmit).
Please refer to our VBA Documentation available at https://www.microfocus.com/documentation/reflection-desktop/18-0-1/vba-guide/getstarted.html.
This documentation provides a quick start and elaborates on the concept of keys.
By utilizing the Macro Recorder and inspecting the generated VBA code, you'll discover the Keys you need.

Thank you Andree for your comment.

As I am using HCL Notes via lotus script, I am unablebto use enumeration constant values as ControlKeyCode_Transmit.

Can you let me know what is the numeric value for this constant so I can use it directly as number ?


Thank you Andree for your comment.

As I am using HCL Notes via lotus script, I am unablebto use enumeration constant values as ControlKeyCode_Transmit.

Can you let me know what is the numeric value for this constant so I can use it directly as number ?

Alon,

The value is 1
Const ControlKeyCode_Transmit = 1
If you require additional values, please access the Object Browser within the Reflection VBA Editor.

cheers
andre


Alon,

The value is 1
Const ControlKeyCode_Transmit = 1
If you require additional values, please access the Object Browser within the Reflection VBA Editor.

cheers
andre

Thank you so much Andre, you are legend !


Thank you so much Andre, you are legend !

HI again, I was trying to add "Reflection for IOBM 16.2" library to Excel VBA, but was not able to find this constant under "Constants".

As I am not so familiar with VBA, can you let me know what am I doing wrong and how can I find all the constants ?

As now I need also the PF1 as well.


HI again, I was trying to add "Reflection for IOBM 16.2" library to Excel VBA, but was not able to find this constant under "Constants".

As I am not so familiar with VBA, can you let me know what am I doing wrong and how can I find all the constants ?

As now I need also the PF1 as well.

Got it 


Got it 

I was able to find

ControlKeyCode_PF1 = 121

ControlKeyCode_PF2 = 122

ControlKeyCode_PF3 = 123

ControlKeyCode_PF4 = 124

But couldn't find equivalent for PF5 & PF6 

Is there any issues with these two ?


I was able to find

ControlKeyCode_PF1 = 121

ControlKeyCode_PF2 = 122

ControlKeyCode_PF3 = 123

ControlKeyCode_PF4 = 124

But couldn't find equivalent for PF5 & PF6 

Is there any issues with these two ?

Hi Alon, 

from the MS VBA user interface add a reference to Attachmate_Reflection_Ojuects_Emulation_Ibmhosts


Then open the object browser in the VBA UI using <F2>
Finally select the Attachmate_Reflection_Obj... library from the dropdown list and in the search box search for ControlKey



Select the key you are looking for and in the bottom grey area you will see the value associated with the key constant which you selected.

Note: Reflection supports the legacy Extra! API also. The vast majority of properties and methods should still work. Some methods and properties are not supported these are documented at: https://www.microfocus.com/documentation/reflection-desktop/18-0/vba-guide/Unsupported%20Extra!%20Methods%20and%20Properties.html  

So you should be able to continue to execute the vast majority of your existing automation code.

e.g.

Option Explicit

Sub Main
   Dim System as Object, Sessions as Object, Session as Object, Screen as Object
   Set System = CreateObject("EXTRA.SYSTEM")
   Set Sessions = System.Sessions
   Set Session = System.ActiveSession 
   Set Screen = Session.Screen
   Screen.SendKeys "Hello<Enter>"
End Sub

Regards,
Tom


Hi Alon, 

from the MS VBA user interface add a reference to Attachmate_Reflection_Ojuects_Emulation_Ibmhosts


Then open the object browser in the VBA UI using <F2>
Finally select the Attachmate_Reflection_Obj... library from the dropdown list and in the search box search for ControlKey



Select the key you are looking for and in the bottom grey area you will see the value associated with the key constant which you selected.

Note: Reflection supports the legacy Extra! API also. The vast majority of properties and methods should still work. Some methods and properties are not supported these are documented at: https://www.microfocus.com/documentation/reflection-desktop/18-0/vba-guide/Unsupported%20Extra!%20Methods%20and%20Properties.html  

So you should be able to continue to execute the vast majority of your existing automation code.

e.g.

Option Explicit

Sub Main
   Dim System as Object, Sessions as Object, Session as Object, Screen as Object
   Set System = CreateObject("EXTRA.SYSTEM")
   Set Sessions = System.Sessions
   Set Session = System.ActiveSession 
   Set Screen = Session.Screen
   Screen.SendKeys "Hello<Enter>"
End Sub

Regards,
Tom

Thank you very much Tom !