Minecraft: fake a double clicking mouse (caution)

Post gaming related scripts
ibsplayz223
Posts: 49
Joined: 02 Sep 2020, 21:54

Minecraft: fake a double clicking mouse (caution)

Post by ibsplayz223 » 11 Feb 2021, 11:23

So a while ago I created a very simple script to make your mouse click twice with a single buttonpress (lbutton), but came across the issue that I couldn't break any blocks. Here is an updated fix!

Code: Select all

settitlematchmode, 2
#notrayicon
#ifwinactive, ahk_exe, javaw.exe
LButton::
	{   
    	KeyWait, LButton, T0.15
	if(ErrorLevel)
		{   
			{
			sendinput, {lbutton down}
			KeyWait, LButton
			sendinput, {lbutton up}
			return
			}
		}
	else
		{ 
		Random, x, 1, 3
		if (x = 1)
			{
			click, left
			sleep, 10
			click, left
			}
		if (x = 2)
			{
			click, left
			sleep, 10
			click, left
			}
		if (x = 3)
			{
			click, left
			}
		}
	return
	}

ARC
Posts: 1
Joined: 16 Jan 2022, 04:36

Re: Minecraft: fake a double clicking mouse (caution)

Post by ARC » 16 Jan 2022, 04:38

yo i am tryna make a video on this for my channel , i wanted to know what should i edit in code to make it triple click and with breaking blocks ( i will give credit 100% )

ibsplayz223
Posts: 49
Joined: 02 Sep 2020, 21:54

Re: Minecraft: fake a double clicking mouse (caution)

Post by ibsplayz223 » 09 Apr 2022, 21:05

ARC wrote:
16 Jan 2022, 04:38
yo i am tryna make a video on this for my channel , i wanted to know what should i edit in code to make it triple click and with breaking blocks ( i will give credit 100% )

Code: Select all

settitlematchmode, 2
#notrayicon
#ifwinactive, ahk_exe, javaw.exe
   LButton:: {
   KeyWait, LButton, T0.15
   if (ErrorLevel) { ; if key held down
         sendinput, {lbutton down}
         KeyWait, LButton ; wait for release
         sendinput, {lbutton up}
         return
    } else  {
      Random, rand, 1, 3  ; 2 in 3 chance of a triple click
      if (rand = 1) {
         click, left
      }
      else {
         click, left
         sleep, 10
         click, left
         sleep, 10
         click, left
      }
   }
   return
}
Here you go, although this code can certainly be improved.

Post Reply

Return to “Gaming Scripts (v1)”