How to set up priorities?

Asked by zroyax on 2019-04-03

I need help to create a part of my script, I want that if a certain image pops up at any time during the script then it does something and after that it goes back to what it was doing. I'm very new to coding I really don't know how I could write it. Thanks in advance guys
Here's the script that needs to be completed:

running = True
while True:
    wait("1554236145760.png", FOREVER)
    wait (5)
    wait ("1554236161631.png", FOREVER)
    click("1554236161631.png")
    click("1554236177062.png")
    click("1554225515405-1.png")
    click("1554225525682.png")
    click("1554316606433.png")
    doubleClick("1554225538043.png")
    click("1554225547956.png")
    doubleClick("1554225538043.png")
    click("1554225547956.png"
    doubleClick("1554225538043.png")
    click("1554225547956.png"
    doubleClick("1554225538043.png")
    click("1554225547956.png"
    click("1554235531636.png")
    click("1554235557443.png")
    click("1554235566082-2.png")

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-04-03
Last reply:
2019-04-04
fran (franly) said : #1

You could use: if, Else or elif depends what you need. Maybe create a function ^^

Can you help with this problem?

Provide an answer of your own, or ask zroyax for more information if necessary.

To post a message you must log in.