Need help with sound! Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
kalip30
Posts: 7
Joined: 28 Aug 2017, 16:01

Need help with sound!

28 Aug 2017, 16:16

So i have made this script

~Mbutton::Suspend, Toggle
*lbutton::
Loop
{
GetKeyState, state, lbutton, P
if State = U
break
; Otherwise:
Send, {lbutton}
Sleep, 0.1
}
return

And i kinda want it to make some beep sound or something when its turned on/off
Any helps please? :)
kalip30
Posts: 7
Joined: 28 Aug 2017, 16:01

Re: Need help with sound!

28 Aug 2017, 17:38

obeeb wrote:use SoundBeep
But how do i do that? i mean like the commands and stuff?
obeeb
Posts: 140
Joined: 20 Feb 2014, 19:15

Re: Need help with sound!

28 Aug 2017, 18:19

put it before and after the loop
kalip30
Posts: 7
Joined: 28 Aug 2017, 16:01

Re: Need help with sound!

29 Aug 2017, 05:54

Hmm i see, so like how do i do it when it's like suspended? like when it's on/off if u know what i mean
User avatar
Capn Odin
Posts: 1308
Joined: 23 Feb 2016, 19:45
Location: Denmark

Re: Need help with sound!  Topic is solved

29 Aug 2017, 06:33

kalip30 wrote:Hmm i see, so like how do i do it when it's like suspended? like when it's on/off if u know what i mean

Code: Select all

~Mbutton::
	Suspend, Toggle
	SoundBeep
return
Please excuse my spelling I am dyslexic.
kalip30
Posts: 7
Joined: 28 Aug 2017, 16:01

Re: Need help with sound!

29 Aug 2017, 11:05

Capn Odin wrote:
kalip30 wrote:Hmm i see, so like how do i do it when it's like suspended? like when it's on/off if u know what i mean

Code: Select all

~Mbutton::
	Suspend, Toggle
	SoundBeep
return
Thanks man! It works perfectly!
kalip30
Posts: 7
Joined: 28 Aug 2017, 16:01

Re: Need help with sound!

29 Aug 2017, 11:17

Code: Select all

~Mbutton::
Suspend, Toggle
SoundBeep, 750, 500
return
*lbutton::
Loop
{
GetKeyState, state, lbutton, P
if State = U
break
; Otherwise:
Send, {lbutton}
Sleep, 0.1
}
return
What if i only want it to just only play sound when it turns off?
User avatar
Capn Odin
Posts: 1308
Joined: 23 Feb 2016, 19:45
Location: Denmark

Re: Need help with sound!

29 Aug 2017, 11:23

Code: Select all

~Mbutton::
	Suspend, Toggle
	if(A_IsSuspended) {
		SoundBeep
	}
return
Please excuse my spelling I am dyslexic.
kalip30
Posts: 7
Joined: 28 Aug 2017, 16:01

Re: Need help with sound!

29 Aug 2017, 11:25

Thank you for the help!
kalip30
Posts: 7
Joined: 28 Aug 2017, 16:01

Re: Need help with sound!

30 Aug 2017, 08:53

Capn Odin wrote:

Code: Select all

~Mbutton::
	Suspend, Toggle
	if(A_IsSuspended) {
		SoundBeep
	}
return
So What if i want it to make sound when it's not suspended? I couldn't figure it out yet, im a newbie :D

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], glnklein, mikeyww and 56 guests