Can anyone tell me what script to write in, for what I have already. I want to add a sound effect (wave file x) to trigger every time I hit the - or + keys. I want the sound to trigger one time and not multiple times - if i hit the key multiple times in a row. When I use the "wait" line - it stops the + or - from adding or subtracting more than one at a time until the sound finishes (not what I want). I just want the sound to trigger one time, and allow me to keep tapping the plus and minus key.
#persistent
number = 20
gosub, write_to_file
return
numpadadd::
number++
gosub, write_to_file
return
numpadsub::
number--
gosub, write_to_file
return
write_to_file:
file := "C:\Users\office339\Desktop\MTG files\testing counter Guest Side.txt"
filedelete, % file
fileappend, % number, % file
return
numpad9::
number = 20
gosub, write_to_file
return
Help with adding sound to a script
Re: Help with adding sound to a script
Hallo,
try:
try:
Code: Select all
#persistent
number = 20
gosub, write_to_file
return
numpadadd::
number++
gosub, Wav
gosub, write_to_file
return
numpadsub::
number--
gosub, Wav
gosub, write_to_file
return
Wav:
IF (A_ThisHotkey <> A_PriorHotkey)
SoundPlay, %A_WinDir%\Media\chimes.wav
Return
write_to_file:
file := "C:\Users\office339\Desktop\MTG files\testing counter Guest Side.txt"
filedelete, % file
fileappend, % number, % file
return
numpad9::
number = 20
gosub, write_to_file
return
Re: Help with adding sound to a script
Perfect except what if I want this to play a different sound?
numpadsub::
number--
numpadsub::
number--
Re: Help with adding sound to a script
wait I think I got it.
I made "wav2" under the subtract hotkeys
and made this:
Wav2:
IF (A_ThisHotkey <> A_PriorHotkey)
SoundPlay, C:\Users\office339\Desktop\MTG stream support files\mp3downXX.wav
Return
working so far.
I made "wav2" under the subtract hotkeys
and made this:
Wav2:
IF (A_ThisHotkey <> A_PriorHotkey)
SoundPlay, C:\Users\office339\Desktop\MTG stream support files\mp3downXX.wav
Return
working so far.
Who is online
Users browsing this forum: Mannaia666 and 409 guests