Advertisement
Guest User

Untitled

a guest
Feb 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.94 KB | None | 0 0
  1. import time
  2. import pyautogui
  3. from logfile2 import first_input, second_input, third_input, input_value, check_number
  4. import keyboard
  5.  
  6. alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
  7.             'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
  8.             's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
  9.  
  10. stopped = 0
  11.  
  12. def force_stop():
  13.     global stopped
  14.     stopped = 1
  15.     time.sleep(9999)
  16.     force_stop()
  17.  
  18. def writer():
  19.     global first_input
  20.     global second_input
  21.     global third_input
  22.     global input_value
  23.     global check_number
  24.     third_input += 1
  25.     if third_input == 26:
  26.         second_input += 1
  27.         third_input = 0
  28.     if second_input == 26:
  29.         first_input += 1
  30.         second_input = 0
  31.     if first_input == 26:
  32.         print('passed through everything!')
  33.     input_value = '\'' + str(alphabet[first_input]) + str(alphabet[second_input]) + str(alphabet[third_input]) + '\''
  34.     check_number = str(first_input * 26 ** 2 + second_input * 26 + third_input)
  35.     find()
  36.  
  37. def page_loding():
  38.     for i in range(0, 2000):
  39.         if pyautogui.pixelMatchesColor(84, 10, (7, 6, 9)) and pyautogui.pixelMatchesColor(93, 20, (7, 6, 9)) is True:
  40.             if pyautogui.pixelMatchesColor(937, 357, (91, 152, 196)) is True and pyautogui.pixelMatchesColor(361, 379, (27, 40, 56)) is True and pyautogui.pixelMatchesColor(210, 739, (16, 24, 34)) is True:
  41.                 append_file = open('workingid.py','a')
  42.                 append_file.write('\nWorking_ID = ' + str(input_value) + ' #Check Number: '+ check_number)
  43.                 append_file.close()
  44.             writer()
  45.         time.sleep(0.1)
  46.     pyautogui.click(83, 47)
  47.     page_loding()
  48.  
  49. def find():
  50.     if stopped == 1:
  51.         print('Stopped!!')
  52.         force_stop()
  53.     pyautogui.doubleClick(576, 52)
  54.     pyautogui.typewrite(alphabet[first_input] + alphabet[second_input] + alphabet[third_input], interval=0.1)
  55.     pyautogui.press('enter')
  56.     append_file = open('logfile2.py','a')
  57.     append_file.write('\nfirst_input = ' + str(first_input) + ' #Number ' + alphabet[first_input] + ' #Value\n')
  58.     append_file.write('second_input = ' + str(second_input) + ' #Number ' + alphabet[second_input] + ' #Value\n')
  59.     append_file.write('third_input = ' + str(third_input) + ' #Number ' + alphabet[third_input] + ' #Value\n')
  60.     append_file.write('input_value = ' +  input_value + '\n')
  61.     append_file.write('check_number = ' + check_number + ' #Check Count!\n')
  62.     append_file.close()
  63.     print('\nfirst_input = ' + str(first_input) + ' #Number ' + alphabet[first_input] + ' #Value')
  64.     print('second_input = ' + str(second_input) + ' #Number ' + alphabet[second_input] + ' #Value')
  65.     print('third_input = ' + str(third_input) + ' #Number ' + alphabet[third_input] + ' #Value')
  66.     print('input_value = ' +  input_value)
  67.     print('check_number = ' + check_number + ' #Check Count!')
  68.     page_loding()
  69.  
  70. keyboard.add_hotkey('del', force_stop, trigger_on_release=True)
  71. writer()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement