Click sound

Ask gaming related questions (AHK v1.1 and older)
Gonzalo94
Posts: 40
Joined: 17 Jul 2017, 12:56

Click sound

02 Apr 2018, 23:05

Hello community. Im interested in something that idk if its really possible to do.

I have this code and i want to know if its possible to add like a kind of "fake click sound" when the spam click is working
thanks if anyone can help me

Code: Select all

CoordMode, Mouse, Window ; sets mouse coordinates  to be relative to either the active window
SetTitleMatchMode, 2 ; A window's title can contain WinTitle param anywhere inside it to be a match. 

#IfWinActive
{
GetKeyState, 123, ESC
if 123 = U
send {Lbutton up} 
return
}
return

$LButton::
~LShift & LButton::
MouseGetPos, x, y ; retrieves the current position of the mouse cursor
if (Between(532, 752, x) and Between(203, 424, y)) {
	While (GetKeyState("LButton", "P")) {
		click
    Sleep -1
	}
return
}
send, {LButton}
return ; end of the hotkey subroutine
#If
F10::Suspend, On
F7::Suspend, Off


Between(__lowerBound, __upperBound, __var) {
If __var between %__lowerBound% and %__upperBound%
	return true
return false
}
neverlevel
Posts: 60
Joined: 13 Apr 2016, 22:02

Re: Click sound

03 Apr 2018, 17:29

Code: Select all

SoundPlay, %A_WinDir%\Media\ding.wav
SoundPlay *-1  ; Simple beep. If the sound card is not available, the sound is generated using the speaker.
directly from the help file by searching soundplay soundbeep may also be helpful. you can go with the beep or find your own sound to play.. keep it in the same place as your script and you can lose the directory info..

Code: Select all

Soundplay, click.wav

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: ReyAHK and 79 guests