Page 1 of 1
Need help with sound!
Posted: 28 Aug 2017, 16:16
by kalip30
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?
Re: Need help with sound!
Posted: 28 Aug 2017, 17:03
by obeeb
Re: Need help with sound!
Posted: 28 Aug 2017, 17:38
by kalip30
But how do i do that? i mean like the commands and stuff?
Re: Need help with sound!
Posted: 28 Aug 2017, 18:19
by obeeb
put it before and after the loop
Re: Need help with sound!
Posted: 29 Aug 2017, 05:54
by kalip30
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
Re: Need help with sound! Topic is solved
Posted: 29 Aug 2017, 06:33
by Capn Odin
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
Re: Need help with sound!
Posted: 29 Aug 2017, 11:05
by kalip30
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!
Re: Need help with sound!
Posted: 29 Aug 2017, 11:17
by kalip30
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?
Re: Need help with sound!
Posted: 29 Aug 2017, 11:23
by Capn Odin
Code: Select all
~Mbutton::
Suspend, Toggle
if(A_IsSuspended) {
SoundBeep
}
return
Re: Need help with sound!
Posted: 29 Aug 2017, 11:25
by kalip30
Thank you for the help!
Re: Need help with sound!
Posted: 30 Aug 2017, 08:53
by kalip30
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