sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #41937
[Question #574238]: SyntaxError ( "no viable alternative at input 'else'", )
New question #574238 on Sikuli:
https://answers.launchpad.net/sikuli/+question/574238
I give up
so all i want to do is
- run the script forever till i close it myself
- look for a image , if it exist do A job
- if image above doesnt exist do B job
here the script i trying to make
while True:
if exists("1489847064867.png"):
find(Pattern("1489844078174.png").similar(0.94))
click(Pattern("1489844364920.png").targetOffset(-17,-1))
wait(3)
click("1489844402652.png")
click(Pattern("1489844426189.png").targetOffset(-69,-50)
else:
click("1489844475242.png")
doubleClick("1489844494184.png")
wait(1)
click("1489844525221.png")
wait(1)
click("1489844525221.png")
wait(1)
doubleClick("1489844579213.png")
click("1489844579213.png")
click("1489844525221.png")
click("1489844525221.png")
wait(2)
click("1489844694993.png"
wait(1)
click("1489844475242.png")
click("1489844494184.png")
wait(1)
click("1489844525221.png")
click(Pattern("1489844364920.png").targetOffset(-17,-1))
wait(3)
click("1489844402652.png")
click(Pattern("1489844426189.png").targetOffset(-69,-50)
wait(1)
error message:
[error] script [ Sikulix ] stopped with error in line 8 at column 4
[error] SyntaxError ( "no viable alternative at input 'else'", )
screen :
http://imgur.com/a/uyFpQ
im really sorry to bother you guys, and thank you for reading this
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.