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

Description changed to:
    def FIRST_zero_loop():
      print('Start of definition FIRST_zero_loop')
      current_loop = (loop[0]) #zero
      print('Searching......at the FIRST_zero_loop. Searching at the 14th 
level.')
      match_percent_address = r"USER_ADDRESS\zero_loop\match_percent.txt"
      file = open(match_percent_address)
      similarity = file.read()
      file.close()
      similarity = float(similarity)
      count = 0
      testtargetOffsetX = 1
      testtargetOffsetY = -8
      float_similarity = float(similarity)
      current_level = (level[14]) #fourteenth
      main_address = r"USER_ADDRESS\zero_loop"
      Reg = Region(413,242,519,366)
      search = True
      while search:# Searching......at the zero loop. Searching at the 14th 
level.
        if 
Reg.exists(Pattern("zero_loop_first_image_used.png").targetOffset(testtargetOffsetX,testtargetOffsetY).similar(similarity)):
          current_image = (image[1]) # 1st Image
          search = False
          SECOND_Print_image_details(current_loop, current_level)
        elif 
  
  
Reg.exists(Pattern(Pattern("zero_loop_twentieth_image_used.png").targetOffset(1,-11)).targetOffset(testtargetOffsetX,testtargetOffsetY).similar(float_similarity)):
          print("20th image found")
          current_image = (image[20]) #20th Image
          search = False
         SECOND_Print_image_details(current_loop, current_level)
        else:
          count = count + 1
          match_percent_address = r"USER_ADDRESS\zero_loop\match_percent.txt"
          file = open(match_percent_address)
          similarity = file.read()
          file.close()
          similarity = float(similarity)
          similarity = similarity - 0.01 # reduce by 1%
          string_similarity = str(similarity)
          print"" + (current_player) + ", " + (current_planet) + ", Loop:" + 
(current_loop) + ", Level:" + (current_level) + ", similarity:" + 
(string_similarity)
          text = str(similarity)
          f = open(match_percent_address, 'w')
          f.write(text)
          f.flush()
          f.close()
          return

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to