Exemple #1
0
 for i in range(random.randint(1, 27)):  #date
     screen.type(Key.DOWN)
 screen.type(Key.TAB)
 for i in range(random.randint(1, 12)):
     screen.type(Key.DOWN)
 screen.type(Key.TAB)
 for i in range(random.randint(18, 50)):
     screen.type(Key.DOWN)
 screen.type(Key.TAB)
 screen.type(Key.DOWN)  #question
 screen.type(Key.TAB)
 screen.paste(
     str(random.randint(1111111111111111111,
                        111111111111111111111)))  #secret answer
 screen.type(Key.TAB)
 screen.mouseMove('Image_Next_To_Captcha.png')
 current_loc = Env.getMouseLocation()
 current_loc.x -= 150
 screen.hover(current_loc)
 #screen.wait(copyImageLocation,15)
 #screen.click(copyImageLocation)
 tries = 0
 while True:  #try a few times to decode the captcha
     tries += 1
     if tries == 10:  #solve manually
         captcha_solution = input(
             "Please enter the solution to the captcha manually")
         break
     screen.rightClick(current_loc)
     try:
         screen.wait(copyImageLocation, 15)
 screen.paste(pwd)
 screen.type(Key.TAB)
 for i in range(random.randint(1,27)): #date
     screen.type(Key.DOWN)
 screen.type(Key.TAB)
 for i in range(random.randint(1,12)):
     screen.type(Key.DOWN)
 screen.type(Key.TAB)
 for i in range(random.randint(18,50)):
     screen.type(Key.DOWN)
 screen.type(Key.TAB)
 screen.type(Key.DOWN) #question
 screen.type(Key.TAB)
 screen.paste(str(random.randint(1111111111111111111,111111111111111111111))) #secret answer
 screen.type(Key.TAB)
 screen.mouseMove('Image_Next_To_Captcha.png')
 current_loc = Env.getMouseLocation()
 current_loc.x -= 150
 screen.hover(current_loc)
 #screen.wait(copyImageLocation,15)
 #screen.click(copyImageLocation)
 tries = 0
 while True: #try a few times to decode the captcha
     tries += 1
     if tries == 10: #solve manually
         captcha_solution = input("Please enter the solution to the captcha manually")
         break
     screen.rightClick(current_loc)
     try:
         screen.wait(copyImageLocation,15)
         screen.click(copyImageLocation)