阅读背景:

mouse click with ctypes.windll and win32api_ducode的博客

来源:互联网 
import win32api
from ctypes import windll


def 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)import win32api
from ctypes import windll




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: