cancel
Showing results for 
Search instead for 
Did you mean: 

Global send keys left mouse click

KristianHolm1
Level 5
Hi I would like to send 3 left mouse clicks in a row, using global send keys. Does anyone know if it is possible.
Regards kristian

------------------------------
Kristian Holm
RPA programmer
PenSam (Pension Company)
Copenhagen Denmark
------------------------------
Kristian Holm RPA programmer PenSam (Pension Company) Copenhagen Denmark
8 REPLIES 8

Hi Kristian,

I'm curious to know why you have this limitation. Could you use LButton with a global send key event? 
With this action, the Interval input is the number of seconds to wait between each key press. The default is 0.1, but you could adjust it based on your needs.

------------------------------
Patrick Aucoin
Senior Product Consultant
Blue Prism
------------------------------

Hi Patrick I have tried global send key event with LButton but it diden't work. I have attached a picture of the navigate properties with global send key event.
I have also attached a png file there shows how the line become highlighted when you manuelly pres shift with numlock on and 5.


------------------------------
Kristian Holm
RPA programmer
PenSam (Pension Company)
Copenhagen Denmark
------------------------------
Kristian Holm RPA programmer PenSam (Pension Company) Copenhagen Denmark

It's curious to me why you would be sending click events using this method instead of Global Mouse Click Centre. Likewise, Global Send Key Events is a last resort which should only need to be used over certain remote desktop applications (IE: RDP, Citrix). In most cases, it's much more reliable to use Global Send Keys instead.

The other thing you may be running into here, is that sending a mouse button event using either of the Send Key(s) actions will blindly assume that you want to click wherever the mouse was last positioned. If you use Global Mouse Click Centre on an element you've spied out (IE: Not the root of the element tree), it'll try and click directly where that element is, assuming it can be spied out (this also applies to any element found via region mode).

------------------------------
Ami Barrett
Sr Product Consultant
Blue Prism
Plano, TX
------------------------------

Hi Ami I have to use global send key and global send keys event or regions as the application is running on cirtrix. My experience of using region in schedules is not so good. Hope you have a trick on how to send 3 left mouse clicks with global send keys.

greetings kristian

------------------------------
Kristian Holm
RPA programmer
PenSam (Pension Company)
Copenhagen Denmark
------------------------------
Kristian Holm RPA programmer PenSam (Pension Company) Copenhagen Denmark

Again, using send keys to click will only send a click event at the cursor's last location. You would need to code in a method to move the mouse to the desired coordinates in order for it to click what it's supposed to.

When you say regions in schedules don't work, are you employing Login Agent? Likewise, are you developing against the same resolution that the bot would have access to? If either of these are not the case, I can certainly see the problem there.

------------------------------
Ami Barrett
Sr Product Consultant
Blue Prism
Plano, TX
------------------------------

Hi Kristian,

What method are you using to locate the target region(s)? Here is what I think is happening in your case: when you are spying the target element in region mode, you are using the image location method. If so, Blue Prism can not click on the box if it can't find the box you told it to look for. The image taken during development matches the runtime image at first, but once you mouse over the area, the change in color means the images no longer match, and Blue Prism is no longer able to consistently locate the target element.

You have to account for how the appearance of the element changes when you interact with it. One common way to do this is to use coordinates method in addition to image method. This will allow Blue Prism to consistently locate the target element (where to click), even as it changes appearance.

To get more familiar with these techniques, I highly recommend taking the Blue Prism Surface Automation course on Blue Prism University.
#surfaceautomation
------------------------------
Patrick Aucoin
Senior Product Consultant
Blue Prism
------------------------------

Hi blueprism team the reason I would like to use global send keys instead of region is because there may be multiple lines and not just one line. How many lines can be on that screen is not to say.
The program must read a line at a time and then with a {DOWN} go down to the next line, which must then be read and so on.

Hope you can help me.

Greetings
Kristian

------------------------------
Kristian Holm
RPA programmer
PenSam (Pension Company)
Copenhagen Denmark
------------------------------
Kristian Holm RPA programmer PenSam (Pension Company) Copenhagen Denmark

Hi Kristian,

These techniques are not mutually exclusive. As part of surface automation, you can and should use region mode along with send keys.

Dynamic regions, scrolling down, and using the down key are all topics that are covered in the advanced training portion of the Surface Automation course on Blue Prism University. Specifically, Section 5 Tabulated Data goes through how to make a coordinate region move from row to row to read through a table.

------------------------------
Patrick Aucoin
Senior Product Consultant
Blue Prism
------------------------------