def switch_site(site_number): image = pyautogui.locateCenterOnScreen( 'C:\\Users\\Jared.Abrahams\\Screenshots\\windows_closed.png', region=(514, 245, 300, 300)) if image is None: image = pyautogui.locateCenterOnScreen( 'C:\\Users\\Jared.Abrahams\\Screenshots\\sc_search_for.png', region=(514, 245, 889, 566)) sc.get_m1_coordinates() x, y = m1['search'] pyautogui.click(m1['close']) while pyautogui.locateCenterOnScreen( 'C:\\Users\\Jared.Abrahams\\Screenshots\\windows_closed.png', region=(514, 245, 300, 300)) is None: pass pyautogui.click(500, 500) keyboard.send('F3') time.sleep(0.5) if site_number == 2: keyboard.write('A1') elif site_number == 3: keyboard.write('A2') elif site_number == 4: keyboard.write('A3') elif site_number == 5: keyboard.write('t') elif site_number == 8: keyboard.write('c') elif site_number == 9: keyboard.write('Welk Resort N') elif site_number == 11: keyboard.write('Welk Resort Bre') # time.sleep(1) keyboard.send('enter') pyautogui.click(10, 25) pyautogui.click(10, 45)
def search_pid(self): sc.get_m1_coordinates() pyautogui.doubleClick(m1['search']) keyboard.write(self.pid) pyautogui.click(m1['find_now']) pyautogui.click(m1['change'])
def insert_new_pid(): sc.get_m1_coordinates() pyautogui.click(m1['insert'])