sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #56481
Re: [Question #695203]: Random move
Question #695203 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/695203
Status: Answered => Solved
Antonín Ušelík confirmed that the question is solved:
hello, I figured out... thanks for info with rndtime I dont know it...
this is code how I change it...
import random
Settings.MouseMoveDelay=0.25
Z1 = Region(270,285,1235,544)
for z in range (10):
for x in range (1000 ) :
if exists(Pattern("smrt.png").similar(0.90)):
click(Pattern("smrt.png").similar(0.90).targetOffset(-40,41),2)
click(Pattern("oprava.png").similar(0.90),2)
click("pomoc.png",2)
click("speedup.png",2)
while exists(Pattern("opravaspeedup.png"),2):
click(Pattern("opravaspeedup.png").similar(0.80).targetOffset(-225,-53),2)
wait(1+rndtime)
click(Pattern("oprava finish.png").similar(0.90).targetOffset(311,11),2)
wait(1 + random.random())
click(Pattern("poslat.png").similar(0.90).targetOffset(-18,-132),5)
click(Pattern("go.png").similar(0.90),5)
wait(Pattern("přílet.png").similar(0.90),3600)
z=z+1
else:
wait(0.1 + random.random())
if Z1.exists(Pattern("wing-1.png").similar(0.90)):
Z1.click(Pattern("wing-3.png").similar(0.90).targetOffset(-102,-3))
if exists("attack-1.png",2):
click(Pattern("attack-2.png").targetOffset(99,8),2)
wait(1 + random.random())
wait("battle.png", 55)
wait(6 + random.random())
x=x+1
else:
wait(3 + random.random())
type(Key.ESC)
wait(1 + random.random())
if exists("noyes.png",2):
click("no.png")
Z2 = Region(631,494,195,215)
w = int(Z2.w * random.random())
h = int(Z2.h * random.random())
Z2.click(Location(w + Z2.x,h + Z2.y))
else:
wait(0.25 + random.random())
else:
Z3 = Region(195,219,1309,611)
wd = int(Z3.w * random.random())
hd = int(Z3.h * random.random())
wu = int(Z3.w * random.random())
hu = int(Z3.h * random.random())
dragDrop(Location(wd+Z3.x,hd+Z3.y),Location(wu+Z3.x,hu+Z3.y))
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.