← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #179795]: can't figure out looping

 

Question #179795 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/179795

RaiMan proposed the following answer:
As mentioned by Mikeldi, you need an infinite loop as the container for
your logic:

while True:
    if not exists("loadmorecomm-2.png",0):
        type(Key.PAGE_DOWN,0)
        wait(1) # to give time to the scroll down
        continue # loop again
    # here we come if image is found
    click("loadmorecomm-2.png",0)
    type(Key.HOME)

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