def clickWindow(hwnd, offset):
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
# print('left, top, right, bottom', left, top, right, bottom)
win32api.SetCursorPos([left + offset, (bottom - top) // 2 + top])
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
time.sleep(0.2)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
time.sleep(0.2)
评论列表
文章目录