Elin
Not enough ratings
A simple AutoHotKey script for the basketball minigame
By catding
A simple AutoHotKey script for the basketball minigame
   
Award
Favorite
Favorited
Unfavorite
script
step 1: Install AutoHotKey
step 2: Create a script with the following code:
F6:: { Send("{Space down}") ; Press and hold the Space key Sleep(750) ; Wait for 1000 milliseconds (1 second). Change this to your desired duration. Send("{Space up}") ; Release the Space key }
step 3: Launch the script
step 4: Press F6 in the minigame
10 Comments
SpiralRazor 18 Apr @ 7:30am 
WhY's script below does work, you need to
A) Use auto hotkey 2
B) When running the script make sure you run it as an admin so that it can hook into the game in fullscreen
C) Rebind F11 to F6 in config because the game uses F11 to send a bug report.
Modwri 18 Dec, 2024 @ 12:29pm 
My wrists thank you for this. Until I used this script, I could only play a few minutes of this at once before I had to do something else. This is a must for anyone with carpal tunnel! :PawHeart:
BCS 26 Nov, 2024 @ 10:32am 
This doesn't work at all, it never "throws" the ball.
WhY 24 Nov, 2024 @ 1:33pm 
Below is an updated version of the script that adds a beep to signal when it's turned on or off, as well as a well to end the script. I used ChatGPT to make the improvements. Thank you for the original script!

#Requires AutoHotkey v2.0
f11::
{
Static running := False
running := !running ; Toggle running state
If running
{
SoundBeep(1500) ; Indicate the script is running
SetTimer(PressSpace, 750) ; Set the timer to repeat every 750ms
}
Else
{
SoundBeep(1000) ; Indicate the script is stopped
SetTimer(PressSpace, 0) ; Stop the timer
}
}

PressSpace()
{
Send("{Space down}") ; Press and hold the Space key
Sleep(750) ; Wait for 750 milliseconds
Send("{Space up}") ; Release the Space key
}

^x::ExitApp ; This makes CTRL+X exit the program.
Dwith 22 Nov, 2024 @ 4:44pm 
To anyone using linux. Download autokey and use this script:

import time

while True:
keyboard.send_keys(" ")
time.sleep(0.75)

You can bind it to f6 in the GUI.
To exit you need to quit autokey. You can use the tray icon for that.
DeadpanPancake 17 Nov, 2024 @ 8:17am 
nice
Kaelen 16 Nov, 2024 @ 8:22pm 
The OG and looping script didn't work for me, this is my tweaked version. It does the same thing but waits for the "u" keyboard key instead.

KeyWait, u, D
Loop {
Send {Space Down}
Sleep 750
Send {Space Up}
}

Esc::ExitApp

For those who didn't use AutoHotKey before : open a blank text, paste the script, save in the .ahk format
LedLoaf 16 Nov, 2024 @ 6:45pm 
Hey, that's NO fun installing Michael Jordan like that.
Stick 15 Nov, 2024 @ 9:05pm 
Added loop for the minigame and escape script

https://pastebin.com/31GUuM3V
👽𝕳𝖆𝖗𝖕𝖆𝖝👽 15 Nov, 2024 @ 8:14pm 
Works perfectly, thanks!