← Back to team overview

sikuli-driver team mailing list archive

[Question #222645]: onAppear, while loop and observe timeout

 

New question #222645 on Sikuli:
https://answers.launchpad.net/sikuli/+question/222645

hi
i want to do something like this:

def closepage(event):
    click("close_subpage")
    # mm.next do not work here

with findAll ("images_on_main_pages") as mm:
    while mm.hasNext():
        click ("image_link_to_subpage")

        if (onAppear("close_subpage", closepage)) #
            mm.next()                                                        # don`t work, i want mm.next() here without processing code after stopObserver()

        observe(20, background=False)
        stopObserver()
        print ("do something else if close_subpage not appear in 20sec") # i want to do this lines only if observe() make timeout
        mm.next()

how make this work?

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