Page 1 of 1

Python - mouse_event from win32api or ctypes

Posted: 27 Nov 2016, 14:45
by Droid Commander
I am trying to implement the "mouse look" feature for my automation project for my game, could someone tell me how to do this?
I am trying to hold down right mouse button and move to a (x,y) but not instantly teleporting the mouse cursor and the object being dragged over to another location, could someone show me how to construct this?

thx!

Code: Select all

import win32api
import ctypes
import time


leftdown = 0x0002
leftup = 0x0004
rightdown = 0x0008
rightup = 0x0010

ctypes.windll.user32.mouse_event(rightdown, 0, 0, 0, 0)
ctypes.windll.user32.mouse_event(1, 100, 0, 0, 0)
ctypes.windll.user32.mouse_event(rightup, 0, 0, 0, 0)

where can i find documentations for python ctypes?

Posted: 27 Nov 2016, 15:32
by Droid Commander
where can i find documentations for python ctypes? especially ctypes.windll