Python - mouse_event from win32api or ctypes

Discuss other programming languages besides AutoHotkey
Droid Commander
Posts: 18
Joined: 10 Feb 2016, 19:02

Python - mouse_event from win32api or ctypes

27 Nov 2016, 14:45

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)
Droid Commander
Posts: 18
Joined: 10 Feb 2016, 19:02

where can i find documentations for python ctypes?

27 Nov 2016, 15:32

where can i find documentations for python ctypes? especially ctypes.windll

Return to “Other Programming Languages”

Who is online

Users browsing this forum: No registered users and 19 guests