SIMPLE HELP. :crazy: :crazy:

Ask gaming related questions (AHK v1.1 and older)
freefirexD
Posts: 1
Joined: 24 Jun 2021, 02:26

SIMPLE HELP. :crazy: :crazy:

Post by freefirexD » 24 Jun 2021, 02:35

:roll: I apologize if I have a topic in the wrong place. I have a Script that when I click on the "J" key it moves the mouse to the Right, I know that if I put "-2600" where there is "2600" the Script makes the mouse go to the left <<
I would like the Script to Move the mouse down when pressing the J key

Code: Select all

	#NoEnv  ; 
; #Warn  ; 
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

j::



Loop 10 {
		DllCall("mouse_event", "UInt", 0x01, "UInt", 2600, "UInt", 0) ; move 1 unit right
		Sleep 5
	} 
	return
[Mod edit: [code][/code] tags added.]
Last edited by gregster on 24 Jun 2021, 10:57, edited 1 time in total.
Reason: Topic moved from 'Scripts and Functions > Gaming'.
User avatar
boiler
Posts: 16923
Joined: 21 Dec 2014, 02:44

Re: SIMPLE HELP. :crazy: :crazy:

Post by boiler » 24 Jun 2021, 14:17

Just use the other parameter for the y direction. Change the 10 to another value as desired.

Code: Select all

j::
	Loop 10 {
		DllCall("mouse_event", "UInt", 0x01, "UInt", 0, "UInt", 10)
		Sleep 5
	} 
return
Post Reply

Return to “Gaming Help (v1)”