사용자 도구


PyUserInput

파이썬에서 마우스, 키보드 입력을 자유 자재로 하기 위한 라이브러리이다.

설치

유의 사항

PyWin32가 설치 되어 있어야 한다. 공식 홈페이지의 위키 참고.

설치

  1. 공식 홈페이지에서 오른쪽의 Download ZIP 버튼을 클릭하여 다운
  2. 압축을 푼 후 command line에서 해당 폴더로 이동
  3. 다음 명령 실행
python setup.py install

예제

from pymouse import PyMouse
 
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,2) #mouse right button press
m.click(x,y,1,2) #mouse left button double click
m.release(x,y) #mouse button release

참고