← Back to team overview

sikuli-driver team mailing list archive

[Question #168536]: Loop script won't work

 

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

Hi all,

I am trying to loop a script, here is my script. Please help me and tell me what i am doing wrong. Still Learning!!!

# --- this loops as long as img is visible
if exists(this image is for it to repeat loop), 0): 
   click getLastMatch()
   if exists(this image is for it to brack loop and continue ):
      continue # skip the rest and start next turn
popup("Under ATTACK!")

But i get this error coming up:

[error] Stopped [error] An error occurs at line 61 [error] Error message: SyntaxError: ("mismatched input ',' expecting COLON", ('C:\\Users\\Mike\\AppData\\Local\\Temp\\sikuli-tmp7966962382069001658.py', 61, 30, 'if exists("1312842456395.png"), 0):\n'))

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