I need a script to move and click my mouse in minecraft,

Ask gaming related questions (AHK v1.1 and older)
itsfiliplol
Posts: 1
Joined: 03 Sep 2022, 11:14

I need a script to move and click my mouse in minecraft,

Post by itsfiliplol » 03 Sep 2022, 11:19

I need a script to start from the centre of the screen, more 100 in the x axis 4 times with a 100ms sleep time, then go back to the centre of my screen and do it again in the opposite direction, then indefinetly repeat. F2 to stop and start the script. The script is for minecraft, Please help.

User avatar
mikeyww
Posts: 26877
Joined: 09 Sep 2014, 18:38

Re: I need a script to move and click my mouse in minecraft,

Post by mikeyww » 27 Sep 2022, 19:11

Welcome to this AutoHotkey forum!

Code: Select all

#MaxThreadsPerHotkey 2
F2::
CoordMode, Mouse
direction := -1, on := !on
While on {
 MouseMove, A_ScreenWidth / 2, A_ScreenHeight / 2
 direction *= -1
 Loop, 4 {
  Sleep, 100 * on
  If on
   MouseMove, 100 * direction, 0,, R
 }
}
Return

Post Reply

Return to “Gaming Help (v1)”