like everyone who requests scripts like this, i have almost no coding knowledge so i dont know how to use autohotkey. let me just get to the point.
i would like a script that does this:
1) if wasd is released, ignore the release
2) while ignoring the release, stop mouse movement
3) release wasd
4) restore the mouse movement
the reason for this is because ive been experiencing this common fallout: new vegas bug where if the mouse is moving and you stop, you slide forward. so if i run an ahk to do these steps i think it might fix it by just making it physically impossible to recreate it.
thank you very much to whoever ends up helping me, it means A LOT!
ahk request
Re: ahk request
Hallo,
try:You have not defined when 3) should happen.
That's why I put in a "Sleep, 2000".
try:
Code: Select all
~*w::Return
~*a::Return
~*s::Return
~*d::Return
$*w Up:: ;1) if wasd is released, ignore the release
$*a Up::
$*s Up::
$*d Up::
Key := "{Blind}{" SubStr(A_ThisHotkey,3) "}"
BlockInput, MouseMove ;2) while ignoring the release, stop mouse movement
Sleep, 2000
Send, % Key ;3) release wasd
BlockInput, MouseMoveOff ;4) restore the mouse movement
Return
That's why I put in a "Sleep, 2000".
-
- Posts: 27
- Joined: 08 Aug 2018, 07:27
Re: ahk request
Code: Select all
loop
{
if GetKeyState("w") or GetKeyState("a") or GetKeyState("s") or GetKeyState("d")
blockinput mousemove
else
blockinput mousemoveoff
}
return
Re: ahk request
any way to make it function for games that use delta mouse movement? (where the mouse stays in the middle in order to move the camera)
Re: ahk request
oh and thanks for the help btw
Re: ahk request
i wasnt very clear in my original post cause i didnt know that the delta mouse movement was a problem until i actually tested the code. i also need the code to use dllcall "mouse_event" in order to actually work with fallout new vegas. i feel like im asking a lot since it probably requires completely rewriting the code. sorry if i was unclear before.
Re: ahk request
bump
Re: ahk request
how many times must i bump this?
Re: ahk request
i dont have the game so i cant test it out, but it for sure sounds like an annoying af glitch. try this:
maybe this would work too:
but truth be told depending on how the game interprets the input to produce this glitch, what ure asking for might be impossible. take a look at this:
Code: Select all
; block mouse and keyboard input via user32.dll\BlockInput,
; while Click/MouseMove/MouseClick/MouseClickDrag in progress
BlockInput Mouse
; on release
~*w Up::
~*a Up::
~*s Up::
~*d Up::
; send dummy relative mousemove event
; just to trigger BlockInput for a split second
MouseMove 0, 0, 0, R
return
Esc::ExitApp
Code: Select all
~*w Up::
~*a Up::
~*s Up::
~*d Up::
key := SubStr(A_ThisHotkey, 3)
BlockInput On
Send % "{Blind}{" key " Down}"
Sleep 50
Send % "{Blind}{" key " Up}"
BlockInput Off
return
Esc::ExitApp
1) if wasd is released, ignore the release - the release has already happened to trigger this, hence impossible to ignore it
2) while ignoring the release, stop mouse movement - releasing is a discrete event
Re: ahk request
the first one just reset the camera up or down, and the second didnt work at all. maybe its possible to rebind the wasd keys to something else like the arrow keys in the game, then make ahk press those keys. maybe that would make the ignore release possible?
Who is online
Users browsing this forum: Google [Bot], mikeyww and 376 guests