sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #15422
Re: [Question #218418]: Linking script back again after else
Question #218418 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/218418
Status: Open => Answered
Roman Podolyan proposed the following answer:
Poh Wei Pin, your logic are not that clear to me (you put label "Blah" after If/Exist statements, not before it to have If run again).
The simple answer for you question is "Yes", you can execute If forever with While infinite looping, see at
http://www.tutorialspoint.com/python/python_while_loop.htm example "The Infinite Loop"
Like that:
while True :
If Exists("Picture A")
Click("Me 1")
Click("Me 2")
Else
Click("Him1")
Click("Him 2")
To break the infinite loop when needed you might use Break Python operator.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.