Gui, show, w300 h100, Bhop Script
Gui, Add, button, vbutton gbutton w150 h50, Toggle BHOP Script
~LButton::SoundPlay, c:\clicks.mp3
return
delete::ExitApp
RSHIFT::Suspend
return
button:
LButton::
Loop
{
SetMouseDelay 37
Click
If (GetKeyState("LButton","P-")=0)
Break
}
return
I just need to know how to make it play a sound file when you hold down LButton
when ever I try to do it.
it says Duplicate Hotkey.
If you find any errors in the code please help me <3
Autoclicker problem!
Re: Autoclicker problem!
Code: Select all
SetMouseDelay 37
toggle := 0 ;off
Gui, Add, button, vbutton gbutton w150 h50, Toggle BHOP Script
Gui, show, w300 h100, Bhop Script
return
delete::ExitApp
RSHIFT::Suspend
f2:: ;can also use a keybind for toggle
button:
toggle := !toggle ;toggle on/off
if (toggle) ;optional sound play when toggled on
SoundPlay, c:\clicks.mp3
return
#if (toggle) ;hotkey only works when toggled
~LButton::
SoundPlay, c:\clicks.mp3
while GetKeyState("LButton","P") {
Click
sleep 10
}
return
#if ;any hotkeys below now work regardless
Some of my AHK programs: 3D Voxel Game - Platformer Game
GitHub projects : Image/Pixel scanning class - Direct2D overlay class
GitHub projects : Image/Pixel scanning class - Direct2D overlay class
Re: Autoclicker problem!
I appreciate you helping, But one thing is wrong! I would like the sound to only play when I'm holding the leftmouse button.Spawnova wrote:~lbutton and lbutton are the same hotkey since ~ only works to not block the original clickCode: Select all
SetMouseDelay 37 toggle := 0 ;off Gui, Add, button, vbutton gbutton w150 h50, Toggle BHOP Script Gui, show, w300 h100, Bhop Script return delete::ExitApp RSHIFT::Suspend f2:: ;can also use a keybind for toggle button: toggle := !toggle ;toggle on/off if (toggle) ;optional sound play when toggled on SoundPlay, c:\clicks.mp3 return #if (toggle) ;hotkey only works when toggled ~LButton:: SoundPlay, c:\clicks.mp3 while GetKeyState("LButton","P") { Click sleep 10 } return #if ;any hotkeys below now work regardless
ex: Hold down left click = play sound
Re: Autoclicker problem!
Code: Select all
Gui, show, w300 h100, Bhop Script
Gui, Add, button, vbutton gbutton w150 h50, Toggle BHOP Script
delete::ExitApp
RSHIFT::Suspend
return
button:
return
LButton::
GetKeyState, keystate, Lbutton,P
if keystate = D
loop
{
SoundPlay, c:\clicks.mp3
Click
Sleep 37
}
else
Break
return
Haven't tested it.
So ye... Test it out, and see if it works.
I'm still pretty new to this, there's a learning curve.
Hope it works.
Who is online
Users browsing this forum: No registered users and 37 guests