[Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post gaming related scripts
User avatar
MrDodel
Posts: 102
Joined: 28 Apr 2021, 09:03
Location: Event Horizon

Re: [Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post by MrDodel » 02 Nov 2021, 12:54

@Download Shrimp

You need too grab the code from post #1 (Above the sample script line) save that as MouseDelta.ahk (into your script folder) and then in your main script add the line at the top #include MouseDelta.Ahk

You can then copy the code from Sample #1 and it should run.
So much universe, and so little time. GNU Sir Terry.
Download Shrimp
Posts: 2
Joined: 13 Oct 2021, 19:25

Re: [Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post by Download Shrimp » 03 Nov 2021, 17:56

@MrDodel
Problem solved, thank you so much.
alexanderlovehya
Posts: 1
Joined: 03 Sep 2022, 06:03

Re: [Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post by alexanderlovehya » 03 Sep 2022, 06:07

Is it possible to hide mouse move events? I want to convert mouse movement into keyboard strokes, but the application is still detecting my mouse movements in addition to keyboard strokes. I'd like the application to only see the keyboard strokes and not my mouse movement.
Celsius
Posts: 1
Joined: 21 Feb 2018, 02:51

Re: [Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post by Celsius » 03 Nov 2022, 13:14

So, let's say I don't want the X and Y sensitivities to be uniform. Can anyone help me with this or? This would interesting to know.

I'm guessing on the line:

if (MouseID){
x *= ScaleFactor, y *= ScaleFactor
DllCall("mouse_event",uint,1,int, x ,int, y,uint,0,int,0)

Would I need to change something here? Or, is it something more complex?
Sad
Posts: 2
Joined: 28 Sep 2023, 00:26

Re: [Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post by Sad » 28 Sep 2023, 00:32

Hello!

I'm using the Sniper mode, it works very well.
I'd like to know if there is a way to turn it "ON" by default ?

Thanks!
Sad
Posts: 2
Joined: 28 Sep 2023, 00:26

Re: [Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post by Sad » 28 Sep 2023, 01:14

Sad wrote:
28 Sep 2023, 00:32
Hello!

I'm using the Sniper mode, it works very well.
I'd like to know if there is a way to turn it "ON" by default ?

Thanks!
I succeed by changing the

Code: Select all

SniperMode
variables from 1 to 0, and vice-versa, then by adding an extra line

Code: Select all

md.SetState(!SniperMode)
after the line

Code: Select all

md := new MouseDelta("MouseEvent").Start()
I'm not sure this was the best way, but it works.

Is there a way to make the sniper mode work only when the game is launched ? I tried with

Code: Select all

#If WinActive("ahk_exe SoTGame.exe")
but no luck so far... and despite I know the block is working for the other hotkeys.
User avatar
billyt
Posts: 60
Joined: 29 Sep 2023, 14:21
Contact:

Re: [Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post by billyt » 22 Jul 2024, 06:43

@evilC Would this make a "Aimbot" like actual aimbot or the same accuracy? For e.g. actual aimbot usually just snapps to the target and is basically 100% accurate whilst the ahk dllcall aimbot ive been using is tracking the target and the user has to move the mouse to hit it and if you adjust sens higher then it bounces right off
w
Sorry I may be slow to respond.
Ouataiveur
Posts: 6
Joined: 27 Mar 2022, 01:01

Re: [Library] MouseDelta - See mouse input the way games see it. (Use for mouse axis->key or joystick)

Post by Ouataiveur » 25 Aug 2024, 13:57

The original post is 9 years old and this unfortunately doesn't seem to work anymore.

MouseMoved(wParam, lParam) callback in MouseDelta is never called for some reason.

I used the following code (it's a cut out from a larger script):

Code: Select all

#Include MouseDelta.ahk
global mouseDeltaHandler := new MouseDelta("MouseEvent")
mouseDeltaHandler.SetState(true)

MouseEvent(MouseID, dx := 0, dy := 0) {
	msgbox % "hi! dx=" dx " dy=" dy
}
I'm using windows 10.

I tried with and without #InstallMouseHook but it did not help.
Last edited by joedf on 25 Aug 2024, 14:20, edited 1 time in total.
Reason: use [code] tags
Post Reply

Return to “Gaming Scripts (v1)”