from pywinauto import Application import pyautogui import time import random app = Application().connect(title="LimbusCompany") game_window = app.window(title="LimbusCompany") a_true = 20 #ideal time for interval a b_true = 210 #ideal time for interval b interval_a = a_true interval_b = b_true # Record the start time for each action last_time_a = time.time() last_time_b = time.time() try: rand_x = random.randint(-100, 100) rand_y = random.randint(-10, 10) random_float = random.uniform(-100, 100) game_window.set_focus() pyautogui.moveTo(1660+rand_x, 710+rand_y) pyautogui.click() pyautogui.press('enter') game_window.minimize() print ("Shouldve entered lux for first time") while True: current_time = time.time() if current_time - last_time_a >= interval_a: interval_a = a_true + random.uniform(-5, 5) game_window.set_focus() pyautogui.press('p') pyautogui.press('enter') game_window.minimize() last_time_a = current_time #resets time for action a print("Should've presed winrate") if current_time - last_time_b >= interval_b: interval_b = b_true + random.uniform(0, 20) rand_x = random.randint(-100, 100) rand_y = random.randint(-10, 10) game_window.set_focus() pyautogui.moveTo(1660+rand_x, 710+rand_y) pyautogui.click() pyautogui.press('enter') game_window.minimize() last_time_b = current_time #resets time for action a print ("Should've entered lux") # Sleep for a short period to avoid excessive CPU usage #thanks chat GPT time.sleep(1) #ctrl+c ends program, needed to do in terminal where script runs, not great except KeyboardInterrupt: print("Program ended")