import win32apifrom ctypes import windlldef click(x, y, button=1, n=1): for i in range(n): flag_press = 2 ** ((2 * button) - 1) flag_release = 2 ** (2 * button) windll.user32.SetCursorPos(x, y) win32api.mouse_event(flag_press, x, y) win32api.mouse_event(flag_release, x, y)click(1558,1066, 2)