shift spamming script

Ask gaming related questions
HolyFlare484
Posts: 5
Joined: 15 Mar 2023, 15:53

shift spamming script

Post by HolyFlare484 » 01 Apr 2023, 19:55

I need a script that spams shift after pressing a button. It's for a Minecraft mod that makes trees and crops grow if you spam shift

The problem is that it can't be too fast, or Minecraft won't register the button input

idk how to explain it well, so here's a little demonstration of what I'm trying to automate
https://youtu.be/eA7QB5u_FAQ


[Mod action: Moved topic to “Gaming” section.]

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

Re: shift spamming script

Post by mikeyww » 02 Apr 2023, 06:31

Test in Notepad.

Code: Select all

#Requires AutoHotkey v2.0
spam := () => Send('{Shift}')

F3:: {
 Static on := False
 If on := !on {
  SetTimer spam, 50
  spam
  SoundBeep 1500
 } Else {
  SetTimer spam, 0
  SoundBeep 1000
 }
}

HolyFlare484
Posts: 5
Joined: 15 Mar 2023, 15:53

Re: shift spamming script

Post by HolyFlare484 » 07 Apr 2023, 12:52

it works!

HolyFlare484
Posts: 5
Joined: 15 Mar 2023, 15:53

Re: shift spamming script

Post by HolyFlare484 » 17 Apr 2023, 16:24

so, how do I replace the "SoundBeep" with "Shift" so that it spams shift and not a sound?

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

Re: shift spamming script

Post by mikeyww » 17 Apr 2023, 16:47

It already spams Shift; check your :arrow: KeyHistory. You can remove the beeps at will. Delete the beep lines.

Post Reply

Return to “Gaming”