python 模擬鍵盤滑鼠輸入
阿新 • • 發佈:2019-01-08
最近需要模擬鍵盤滑鼠的輸入,一番查詢之後,得到的一些結果
************************************************************************************************************************
pyUserInput,可以模擬鍵盤滑鼠,功能很全,用起來很方便
需要同時安裝pyhook
這是其中pyMouse的一個例子
from pymouse importPyMouse
m =PyMouse()
m.position()#gets mouse current position coordinates
m.move(x,y)
m.click(x,y)#the third argument "1" represents the mouse button
m.press(x,y)#mouse button press
m.release(x,y)#mouse button release
************************************************************************************************************************
eventGhost
************************************************************************************************************************
************************************************************************************************************************
http://stackoverflow.com/questions/11906925/python-simulate-keydown各種模擬key的方法 提到了direct input