cancel
Showing results for 
Search instead for 
Did you mean: 

Sending basic Select All, Copy, and Paste commands

JustinBishop
Level 4
I am struggling with sending basic Windows commands to any application or browser. I would like to be able to send Windows commands like Ctrl+A, Ctrl+C, and Ctrl+V to any active application without having to model the "Edit" menu. Any suggestions?
1 BEST ANSWER

Helpful Answers

Denis__Dennehy
Level 15
Hi Justin, It sounds like Blue Prism is getting focus back as you debug your work in Object Studio. When sending keystrokes the usual way of debugging by stepping will not work as Blue Prism will regain focus between each stage. Try the following: Naviage Stage - Activate Main Window Wait Stage - Wait 0.25 seconds to give the main window time to be focused Navigate Stage - Send Key Events - Sending your Ctrl-A Another Stage - whatever the next stage is in your flow. To be able to run and test the above you need to put a break point on 'Another Stage' after you have done the keysrokes and run the dubugger to the breakpoint. Stepping through the object will mean that Blue Prism will regain focus and you will be sending the Ctrl-A to Blue Prism instead.

View answer in original post

6 REPLIES 6

ChrisSneddon
Level 4
Hi Justin, If you are using Global Send Key Events: ""{CTRL}"" - presses the ctrl key down () For Global Send Keys: ""^(a)"" A full list of sendkeys (not sendkey events) can be found at http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.s

JustinBishop
Level 4
Thank you Chris. I found those commands on the web and tried them but did not have any success. I'll take another shot at it today.

I am getting the same results as yesterday. I have a stage that is set to ""focus"" on the application and then the stage to perform Global Send Keys. Whether I use Global Send Keys or Global Send Key events, when I run the stages what ends up getting selected are the stages (shapes) in BP and not what's on screen in the application.

ChrisSneddon
Level 4
Focus is not being set to the target system. This is because you aren't correctly activating the application or when testing it you are forcing focus back to Blue Prism i.e. by stepping through the process rather than running it or stepping out. You need the target system to be in front of Blue Prism when you send the CTRL A otherwise CTRL A goes to Blue Prism which is what's happening.

Denis__Dennehy
Level 15
Hi Justin, It sounds like Blue Prism is getting focus back as you debug your work in Object Studio. When sending keystrokes the usual way of debugging by stepping will not work as Blue Prism will regain focus between each stage. Try the following: Naviage Stage - Activate Main Window Wait Stage - Wait 0.25 seconds to give the main window time to be focused Navigate Stage - Send Key Events - Sending your Ctrl-A Another Stage - whatever the next stage is in your flow. To be able to run and test the above you need to put a break point on 'Another Stage' after you have done the keysrokes and run the dubugger to the breakpoint. Stepping through the object will mean that Blue Prism will regain focus and you will be sending the Ctrl-A to Blue Prism instead.

Thanks guys! I will try that.