hey guys im new and im a big noob, i wanna play Minecraft but im tired to constantly click right click to attack,
so i want like when i hold right click, it will attack with around 10 - 15 cps.
when i stop holding right click, it stops
Help to constantly click right click when holding it
-
- Posts: 2
- Joined: 29 Nov 2015, 05:35
Re: Help to constantly click right click when holding it
Random number between 8 and 12 clicks per second, while holding down the left mouse button and calculated at each delay between clicks. Only because I had the code lying around.
Code: Select all
cpsmin := 8
cpsmax := 12
~$LButton::
While GetKeyState("LButton", "P")
{
Click
delay := delay(8,12)
Sleep %delay%
}
return
delay(cpsmin, cpsmax)
{
Random, number, cpsmin, cpsmax
delay := 1000/number
;msgbox, %delay%
return, %delay%
}
-
- Posts: 2
- Joined: 29 Nov 2015, 05:35
Re: Help to constantly click right click when holding it
thanks! this worked well for me
Re: Help to constantly click right click when holding it
Is it possible someone can recreate this with right clicking instead?
Re: Help to constantly click right click when holding it
@Evan2533
Just some replacing:
Just some replacing:
Code: Select all
cpsmin := 8
cpsmax := 12
~$RButton::
While GetKeyState("RButton", "P")
{
Click Right
delay := delay(8,12)
Sleep %delay%
}
return
delay(cpsmin, cpsmax)
{
Random, number, cpsmin, cpsmax
delay := 1000/number
;msgbox, %delay%
return, %delay%
}
-
- Posts: 3
- Joined: 09 Aug 2021, 00:02
Re: Help to constantly click right click when holding it
@Ianizer
-Can you help me make a macro
Macro for Right Click : If hold Right Click =>Press F2 ( or 2 ) wait300 hold F7 2000 wait 300 F2 wait300 F4 ) loop and stop when i stop hold.
- Page Up to pause script
-page down to use script again
-Can you help me make a macro
Macro for Right Click : If hold Right Click =>Press F2 ( or 2 ) wait300 hold F7 2000 wait 300 F2 wait300 F4 ) loop and stop when i stop hold.
- Page Up to pause script
-page down to use script again
Re: Help to constantly click right click when holding it
@sarengan719
I think this is what you're asking:
I think this is what you're asking:
Code: Select all
SendMode, Input
~*$RButton::
while GetKeyState("RButton", "P")
{
Send, {F2}
Sleep, 300
Send, {F7 Down}
Sleep, 300
Send {F7 Up}{F2}
Sleep, 300
Send {F4}
Sleep, 100
}
return
PgUp::Pause, On
PgDn::Pause, Off
-
- Posts: 3
- Joined: 09 Aug 2021, 00:02
Re: Help to constantly click right click when holding it
@Ianizer
Ths you verymuch
Ths you verymuch
-
- Posts: 6
- Joined: 03 Jun 2022, 01:03
Re: Help to constantly click right click when holding it
@Ianizer
The above cps script(hold and it repeats one) but is there a way to set hotkey for it? like M key on keyboard and such or do u need another script?
The above cps script(hold and it repeats one) but is there a way to set hotkey for it? like M key on keyboard and such or do u need another script?
Re: Help to constantly click right click when holding it
@HikariChama
If neither of these is what you're asking for, please make a new forum topic (the button on the left of this link: viewforum.php?f=18) and give step-by-step instructions for what you want the script to do.
SCRIPT 1:
Only autoclicks while holding left click if M toggled its ability to do so.
SCRIPT 2:
Starts clicking once M is pressed, stops when pressed again.
If neither of these is what you're asking for, please make a new forum topic (the button on the left of this link: viewforum.php?f=18) and give step-by-step instructions for what you want the script to do.
SCRIPT 1:
Only autoclicks while holding left click if M toggled its ability to do so.
Code: Select all
#MaxThreadsPerHotkey, 2
cpsmin := 8
cpsmax := 12
#If (SpamClick)
LButton::
while (GetKeyState("LButton", "P") && SpamClick)
{
Click
Sleep, delay(cpsmin, cpsmax)
}
return
#If
m::
SpamClick := !SpamClick
gosub, LButton ;so if LButton is currently held, it will start clicking
return
delay(cpsmin, cpsmax)
{
Random, number, cpsmin, cpsmax
return 1000/number
}
Starts clicking once M is pressed, stops when pressed again.
Code: Select all
#MaxThreadsPerHotkey, 2
cpsmin := 8
cpsmax := 12
m::
KeepClicking := !KeepClicking
while (KeepClicking)
{
Click
Sleep, delay(cpsmin, cpsmax)
}
return
delay(cpsmin, cpsmax)
{
Random, number, cpsmin, cpsmax
return 1000/number
}
-
- Posts: 6
- Joined: 03 Jun 2022, 01:03
Re: Help to constantly click right click when holding it
@Ianizer Thanks a lot, first one's exactly what i was looking for how do you turn it into right click as well?
-
- Posts: 6
- Joined: 03 Jun 2022, 01:03
Re: Help to constantly click right click when holding it
Ah also I forgot to mention but is it also possible to be able to type the letter m as well while the script also works itself out?
Re: Help to constantly click right click when holding it
Just replace LButton by RButton as was done in an earlier post in this same thread:HikariChama wrote: ↑01 Oct 2022, 10:16@Ianizer Thanks a lot, first one's exactly what i was looking for how do you turn it into right click as well?
Code: Select all
#MaxThreadsPerHotkey, 2
cpsmin := 8
cpsmax := 12
#If (SpamClick)
RButton::
while (GetKeyState("RButton", "P") && SpamClick) {
Click
Sleep, delay(cpsmin, cpsmax)
}
return
#If
~m::
SpamClick := !SpamClick
ToolTip, % SpamClick ; added to let you know the toggle status —1 is true or active—, you can safely remove if it is of no help for you.
gosub, RButton ; so if RButton is currently held, it will start clicking
return
delay(cpsmin, cpsmax) {
Random, number, cpsmin, cpsmax
return 1000/number
}
I could be wrong, but I think it is not possible, because as soon as you press m, the toggle changes its status and the hotkey becomes inactive.HikariChama wrote: ↑01 Oct 2022, 10:23Ah also I forgot to mention but is it also possible to be able to type the letter m as well while the script also works itself out?
Instead, you may want to suspend the script in order to use the letter m as usual, for example:
Code: Select all
|::Suspend, Toggle
-
- Posts: 6
- Joined: 03 Jun 2022, 01:03
Re: Help to constantly click right click when holding it
@sofista The first one started clicking left click when holding right, i tried to change various keys etc but i cant figure what to do in order to get it to click right, I swapped various key words and never got what i need and instead got ones where it left clicks or right clicks when holding m key.
On that note, I kind of dont know much about this so do i use the second one as seperate script or something?
On that note, I kind of dont know much about this so do i use the second one as seperate script or something?
Re: Help to constantly click right click when holding it
If I understood you correctly, replace line 8 of the script by the following:HikariChama wrote: ↑13 Oct 2022, 09:40@sofista The first one started clicking left click when holding right, i tried to change various keys etc but i cant figure what to do in order to get it to click right, I swapped various key words and never got what i need and instead got ones where it left clicks or right clicks when holding m key.
Code: Select all
Click, Right
If you mean the hotkey to suspend the script, you can put it at the bottom of the script itself.On that note, I kind of dont know much about this so do i use the second one as seperate script or something?
-
- Posts: 6
- Joined: 03 Jun 2022, 01:03
Re: Help to constantly click right click when holding it
Thank you so much, it worked correctly, I have no experience in these so sorry about it.
-
- Posts: 6
- Joined: 03 Jun 2022, 01:03
Re: Help to constantly click right click when holding it
On that topic, i see that no matter how much cps i change it to, it's stuck in a range of 10-17 cps in actuality, is there a way to go above and beyond like 50, 100 and so on
Re: Help to constantly click right click when holding it
Can you please help to also add "F4" as repeated along with the right click while holding??Ianizer wrote: ↑02 Aug 2021, 13:06@Evan2533
Just some replacing:Code: Select all
cpsmin := 8 cpsmax := 12 ~$RButton:: While GetKeyState("RButton", "P") { Click Right delay := delay(8,12) Sleep %delay% } return delay(cpsmin, cpsmax) { Random, number, cpsmin, cpsmax delay := 1000/number ;msgbox, %delay% return, %delay% }
Re: Help to constantly click right click when holding it
@sinosino
I added F4 like you asked and made the code more concise for the same result.
I added F4 like you asked and made the code more concise for the same result.
Code: Select all
cpsmin := 8
cpsmax := 12
~$RButton::
While GetKeyState("RButton", "P")
{
Click Right
SendInput, {F4}
Sleep delay(cpsmin, cpsmax)
}
return
delay(cpsmin, cpsmax)
{
Random, number, cpsmin, cpsmax
return, 1000/number
}
Re: Help to constantly click right click when holding it
@Ianizer
WOW! awesome works amazing. Thank you so much!
WOW! awesome works amazing. Thank you so much!
Who is online
Users browsing this forum: IWhitePhoenixI, rikoahk and 37 guests