[Sikuli-driver] [Question #266832]: Mouse clicks in a loop failed

2015-05-12 Thread Pak Lam
New question #266832 on Sikuli:
https://answers.launchpad.net/sikuli/+question/266832

Hi,

I was writing a loop clicking on a game board which should help to me click 24 
buttons, here's the code:

try:
gbc=find(Pattern("1431440461493.png").similar(0.35)).getCenter()
print "Found gameboard"
for x in range (0,24):
hover(gbc.offset(xtuple[x],ytuple[x]))
for m in xrange(2):
mouseDown(Button.LEFT)
mouseUp(Button.LEFT)
print "Click: (",xtuple[x],", ",ytuple[x],")"
except Findfailed:
print "findgameboardagain"

and the above codes is inside a while loop...
however while i run the code, it can do the clicking sometimes, but just 1~2 
loops.
afterward the whole program is stuck in some part of the 24 loops click, 
sometimes while i press "cmd + tab" and it moves again...
and sometimes it just don't move... in that case i have to stop the script 
manually.

here's the messages:

Let's find gameboard
Found gameboard

Click: ( -145 , -150 )

Click: ( -68 , -148 )

Click: ( 2 , -144 )

Click: ( 83 , -148 )

Click: ( 156 , -147 )

java.lang.InterruptedException: sleep interrupted
at java.lang.Thread.sleep(Native Method)
at java.awt.Robot.delay(Robot.java:535)
at java.awt.Robot.autoDelay(Robot.java:521)
at java.awt.Robot.afterEvent(Robot.java:471)
at java.awt.Robot.mouseRelease(Robot.java:315)
at org.sikuli.script.RobotDesktop.mouseUp(RobotDesktop.java:110)
at org.sikuli.script.Mouse.up(Mouse.java:365)
at org.sikuli.script.Mouse.up(Mouse.java:349)
at org.sikuli.script.Mouse.reset(Mouse.java:100)
at org.sikuli.script.Sikulix.cleanUp(Sikulix.java:197)
at org.sikuli.ide.SikuliIDE$ButtonRun$1.run(SikuliIDE.java:2252)

i still can't figure out why sometimes it clicks all 24 points, but sometimes 
just stop without any warnings.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #266832]: Mouse clicks in a loop failed

2015-05-12 Thread RaiMan
Question #266832 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/266832

Status: Open => Needs information

RaiMan requested more information:
what version of Sikuli?
what system?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #266832]: Mouse clicks in a loop failed

2015-05-12 Thread Pak Lam
Question #266832 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/266832

Pak Lam posted a new comment:
SikulixIDE 1.1.0
Mac OSX 10.10.2

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #266832]: Mouse clicks in a loop failed

2015-05-12 Thread Pak Lam
Question #266832 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/266832

Pak Lam posted a new comment:
And i also tried to change the clicking to:

for x in range (0,24):
switchApp("Google Chrome")
click(gbc.offset(xtuple[x],ytuple[x]))
print "Click: (",xtuple[x],", ",ytuple[x],")"

still same...

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #266832]: Mouse clicks in a loop failed

2015-05-12 Thread RaiMan
Question #266832 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/266832

Status: Needs information => Answered

RaiMan proposed the following answer:
see bug 1447096

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp