import pyautogui import time import datetime # Set the button coordinates (Replace with your own coordinates) button_x, button_y = 500, 300 # Delay between actions (0.5 seconds) action_delay = 0.5 # Function to generate a password def gen(x, d, m, y, a, b): dizi = [ 50, 1, 75, 12, -3, 1, 60, -20, -5, 79, 99, -30, -45, 55, 25, 92, 15, -7, 33, -17 ] p1 = (b + d) * (a + b) + 365 * (y - 571 - (d * d)) - 30 * m p3 = (b + 1) * (a + 1) * (dizi[b % 20]) p2 = p1 + x + (p3 % 1000) p2 = str(p2) p4 = 100 - int(p2[2] + p2[3]) pass_str = str(p4) + p2[2:] return pass_str # Click on the button pyautogui.click(button_x, button_y) time.sleep(action_delay) # Get the current date and time now = datetime.datetime.now() d, m, y, a, b = now.day, now.month, now.year, now.hour, now.minute # Generate a password (Replace the values as needed) x_value = 123 password = gen(x_value, d, m, y, a, b) # Type the password pyautogui.typewrite(password, interval=0.1) # Adjust the interval if needed time.sleep(action_delay) # Press Enter twice pyautogui.press('enter') time.sleep(action_delay) pyautogui.press('enter')