Trying to simulate a mouse with key inputs in Mirror's Edge Topic is solved

Ask gaming related questions (AHK v1.1 and older)
fakedt

Trying to simulate a mouse with key inputs in Mirror's Edge  Topic is solved

08 Oct 2018, 10:00

Hey, I'm trying to emulate mouse movement in Mirror's Edge with keyboard input as I'm trying to make the game playable on a dance pad for funsies. The problem I have right now is that when I use MouseMove, it actually moves the cursor and the game gets its mouse input from the actual movement of the cursor for whatever reason when using the script, and the reason this is a problem is that the cursor eventually reaches the edge of the window and gets stuck. I can see that it moves the cursor in the window by enabling the Steam overlay, and checking the cursor position after turning in-game using my script. And although the cursor also moves when using a normal mouse device, there is no problem when it reaches the edge of the window. The problem persists when the Steam overlay is disabled.

Here is my current code:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
;SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

CoordMode, Mouse, Client

DeltaX = 10
CursorTime = 5
SetDefaultMouseSpeed, 0 ; Sets the delay of mouse speed to instant

left::MouseMove, -40, 0, 3, R
right::MouseMove, 40, 0, 3, R

a::MouseMove, -1*DeltaX, 0, CursorTime, R
b::MouseMove, 1*DeltaX, 0, CursorTime, R
I have two commands for turning as one of them is turning 90 degrees, and the other if for more fine turning, and the problem affects both of them.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Shoobis and 29 guests