cancel
Showing results for 
Search instead for 
Did you mean: 

Global Send Key Events problem

ScottRobson
Level 6
Hi all, i'm needing to send an F16 key to a mainframe application. The Object is spied as a Mainframe Application - Mainframe (IBM PCom HLLAPI). I am using Global Send Key Events, and have tried sending "{F16}", as suggested in the Blue Prism help pages and documentation, but this gives me the error "Internal : Failed to perform step.......... - Unsupported key F16 ". Using the same syntax, F1 through to F12 work fine. I've also tried "+{F4}" and "@g" (apparently an ASCII code for F16), alternatives I had found online. None of them work. Would be a great help if anyone has an alternative solution to try, as the workaround I have in place is rather ugly (and I may not always have the luxury of being able to use a workaround in similar situations). Thanks in advance.
6 REPLIES 6

ChrisSneddon
Level 4
I'm assuming you have thick client access to IBM PCom. When interfacing with IBM Pcom the mnemonic keywords need to be enclosed in square brackets e.g.[enter] [pf16] [delete] etc. Also when interfacing with mainframe emulators always use Send Keys not Send Key Events. When using send keys the emulator doesn't need to have focus or even be visible. This allows you to run more than one process at a time on the same runtime resource and it will be considerably faster than send key events.

ScottRobson
Level 6
Hi Chris, thanks for your response. Apologies for my slow response, I had trouble accessing the new site. Not sure exactly what you mean by thick client access. Forgot to mention I had also tried that syntax previously, but just given it another go and it's still not working. If I use Global Send Key, it just types the text [F16] onto the screen. If I use Global Send Key Events, nothing happens, as if the button isn't being 'sent'. We were also unable to send the CTRL key either, but at least had a way around that by remapping the PCOMM keyboard layout to accomodate. Any other suggestions on how we can send F16?

ChrisSneddon
Level 4
Thick client is where the application is local i.e. on the same machine as Blue Prism rather delivered via Citrix (thin client). If it is you will select the Mainframe session when running the Application Modeller wizard in object studio. If you are using a thick client select ""Mainframe (IBM)"" rather than ""Mainframe (IBM PCom HLLAPI)"" when selecting the application from the Application Modeller wizard. Again use send keys not send key events and function keys are prefixed with a ""p"" and in square brackets e.g. [pf16], [pf5]

ScottRobson
Level 6
Ah yes, then we are indeed on a thick client. Apologies for being thick. :-) Still no joy. Even after amending the Application Modeller wizard to set the application up as ""Mainframe (IBM)"", I still see the same outcome. Using ""[pf16]"" in the value field within the Navigate item, if I choose Global Send Keys, it trys to type [pf16] onto the screen (resulting in the below message because there is nowhere on the first screen to type into). Internal : Failed to perform step 1 in Navigate Stage 'F16 (not working)' on page 'Get PI Data from Mainframe' - Failed to send keystroke - Presentation space keyboard locked If I use Global Send Key Events, BP will send something to the PCOM session, but PCOM doesn't accept the value being sent, eg: as if an unknown keystroke has been entered. Update - Breaking News! I've managed to get it working! After lots of trial and error, I finally managed to get it to send F16 to my terminal by using Global Send Keys with a value of ""@g"" (we already use ""@1"" for F1, etc.). I even set the Application model back to Mainframe (IBM PCom HLLAPI) as I didn't fancy a huge amount of regression of other existing processes, and it still works. Still don't understand why previous attempts to use Global Send Key were physically typing the text onto the screen rather than 'sending', but it works for now, and that is good enough for me in the short term! Thanks for your help Chris. Certainly gave me some other options worth trying.

MiriamToca
Level 2
I have another problem with SendKeys. I am trying to insert a text into a AAEdit and resume. I put in the Global Send Keys: ""Text{ENTER}"" And there is an error: ""Internal : Failed to perform step 1 in Navigate Stage 'Navigate1' on page 'Insert' - Command 'AASendKeys' gave invalid result"" Could you help me?

Denis__Dennehy
Level 15
Hi Miriam, As a minimum I would recommend having your text and your enter keystroke on seperate lines in your navigate stage. I would also recommend looking at some of the recommendations in the Surface Automation training: Have you tried pasting in your text rather than send keys? If send keys does not work have you tried send key events? Also, the SA training contains the line 'Blue Prism Best Practice recommends adding a 0.1 second keystroke between each character sent'. This is because we have found that sending keystrokes all at once may be too quick for the application. Contact your Blue Prism mentor if you are unsure of how to do this (we usually do it via a send keys sub-page that enters each keystroke individually).