Jump to content

Play wav file on key press


mange181

Recommended Posts

Ok so im doin a hyperspin cab. 

 

http://www.hyperspin-fe.com/topic/12197-2-player-cab/

 

Im not going to buy and mount a coindoor. But im going to have a button where the coindoor would normaly be at. 

 

So i got this idea that everytime the coin button is pushed a coin sound is played.  Im using joytokey so a program that sends the keypress "k" as normal and play the wav file would be great.

I googled a ahk script with probebly works but it plays the windows "nono" sound, Most likely the program lack right to play files from the place its at. a work around would be to change the windows sound ofcourse. but it feels tacky.. :)

 

I think this is a simple task and many solutions is probebly out there. How would you do this? any input is appriciated.

 

 

Link to comment
Share on other sites

Surprisingly it works. I created a ahk script. works both in hyperspin and in win7 os.

 

 

174MB video   https://onedrive.live.com/redir?resid=341ED4719A50B62B!6112&authkey=!AAWGu0PGdx8P9Dc&ithint=video%2cmp4

------------------------------------------------------------------------

 

what it does---- playes c:\cut.wav when key o is pressed.
 
get it to work---- place the exe file in startup. place cut.wav in the root of c:\
 
If you want it binded to other keys or change the file string. go to
 
 
install.
 
always 32 ver even if you got 64bit os. 
otherwise the compilation of your exe file wont work.
then edit the ahk file in the pack. when done save and rightklick an select compile.
the exe file is in same folder as the ahk file you just edited.
 
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...