美文网首页
pymouse的使用

pymouse的使用

作者: MkTom | 来源:发表于2019-05-12 17:42 被阅读0次
# import the module
from pymouse import PyMouse

# instantiate an mouse object
m = PyMouse()

# move the mouse to int x and int y (these are absolute positions)
m.move(200, 200)

# click works about the same, except for int button possible values are 1: left, 2: right, 3: middle
m.click(500, 300, 1)    # (x坐标,y坐标,点击次数)

# get the screen size
m.screen_size()
# (1024, 768)

# get the mouse position
m.position()
# (500, 300)

相关文章

网友评论

      本文标题:pymouse的使用

      本文链接:https://www.haomeiwen.com/subject/olacaqtx.html