How do i for use the function "OR"? --- there is no function or, use if

Asked by Raphael Silva

Is this right?

wait("Faturamentcd.png",30) or CapturaTela()

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Surely not ;-)

There is no "function" or.
or is an operator to build conditionals to be used in if/while constructs.

Supposing CapturaTela() is a private function, that should be called, if the image "Faturamentcd.png" does not appear within 30 seconds:

if not exists("Faturamentcd.png", 30):
    CapturaTela() # repair the problem
# here the normal workflow continues

Come back with more info on what you want to achieve, if I did not guess right.

BTW: Sikuli talks Python language level 2.5 (Interpreter used internally is Jython 2.5)

Can you help with this problem?

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

To post a message you must log in.