Reputation: 12858
I am trying to select an entire line of text on a web page (in a table) using Sikuli. The easiest way to select the text is to "triple-click" on it. Is there a way to triple-click in Sikuli? Thanks!
Upvotes: 3
Views: 7116
Reputation: 2505
I f you use .click()
will be good enough.
.click()
is the left mouse button, .rightClick()
is the right mouse button.
For example:
image1 = ("image1.png")
def multiClick(nTime):
imageLoc = find(image1)
for n in xrange(nTime):
imageLoc.click()
# Click 3 times.
multiClick(3)
Upvotes: 0
Reputation: 51
This works for me:
def tripleClick(PSMRL):
hover(PSMRL)
for x in xrange(3):
mouseDown(Button.LEFT)
mouseUp()
Upvotes: 5
Reputation: 578
GregH,
I got the following to work for me:
click(img.png)
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
wait(0.01)
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
This allowed me triple click on a button, link, or whatever I needed to click on.
Upvotes: 5
Reputation: 11
quick fix solution would be to check out the mouse settings in control panel and you can lower the time between clicks required to register successive clicks needed to perform the 'triple click' action
Upvotes: 1
Reputation: 3441
Depending on what is being clicked, sometimes, the click type is the same as multiple clicks in succession. Meaning, if what needs to be clicked doesn't have to be double/triple-clicked very fast, then you can just use a sequence of single clicks. 2 clicks = double-click, 3 clicks = triple click. I know that 2 clicks will simulate a double-click on Windows desktop (not sure about things like games, etc.)
I've seldom heard of a triple-click action though.
So, have you tried using 3 clicks to simulate triple-click to see if that works or not?
Upvotes: 0
Reputation: 20531
Have you tried low level mouse functions? Something like this should work:
for x in xrange(3):
region.mouseDown()
region.mouseUp()
Upvotes: 0