Controlling mouse with Python -


How to control the mouse cursor in a python, that is, move it to a fixed position and click under Windows ?

test on WinXP, after installing Python 2.6 (in my case pywin32-214.win32-py2 .6.exe): Win32api, win32con def (X, Y): win32api.SetCursorPos ((x, y)) win32api.mouse_event (win32con.mouSEEVENTF_LEFTDOWN, x, y, 0,0) win32api Mouse_event (win32con.MOUSEEVENTF_LEFTUP , X, y, 0,0) (10,10)


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -