winguiauto.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pyAutoTrading 作者: drongh 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号