Jump to content

Playing sounds on a press of a mouse button?


Piu

Recommended Posts

I play some FPS games, and I'd like to bind some audio files to play on the click on a mouse button (MOUSE4/MOUSE5, to say). I'd have my recording device on Stereo Mix so all I need is a program/script/some other way to play the sound when I press a mouse button.

 

Is this possible?

 

Thanks in advance.

zuzmo.png

collio.png

[hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide]

Never gonna give you up.[/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide]

"We don't want players to be able to buy their way to success in RuneScape. If we let players start doing this, it devalues RuneScape for others. We feel your status in real-life shouldn't affect your ability to be successful in RuneScape" Jagex 01/04/01 - 02/03/12

Link to comment
Share on other sites

Theoretically it's doable, however once your pc is focused into the game window the game would take over mouse/keyboard input commands so likely would not work whilst in-game.

Plv6Dz6.jpg

Operation Gold Sparkles :: Chompy Kills ::  Full Profound :: Champions :: Barbarian Notes :: Champions Tackle Box :: MA Rewards

Dragonkin Journals :: Ports Stories :: Elder Chronicles :: Boss Slayer :: Penance King :: Kal'gerion Titles :: Gold Statue

Link to comment
Share on other sites

I'm no tech genius, but I am still able to change my FOV (Field of view) using a program I downloaded with the + and - keys whilst in-game. :?

zuzmo.png

collio.png

[hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide]

Never gonna give you up.[/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide]

"We don't want players to be able to buy their way to success in RuneScape. If we let players start doing this, it devalues RuneScape for others. We feel your status in real-life shouldn't affect your ability to be successful in RuneScape" Jagex 01/04/01 - 02/03/12

Link to comment
Share on other sites

It can be done easily in AHK. However, the sound files have to be .wav. If they sound files aren't saved in the same directory as the script, you have to specify the absolute path.

 

Xbutton1::
ifexist, yoursoundfile.wav
Soundplay, yoursoundfile.wav
else
Msgbox, Sound file does not exist
return


Xbutton2::
ifexist, yoursoundfile2.wav
Soundplay, yoursoundfile2.wav
else
Msgbox, Sound file does not exist
return

Link to comment
Share on other sites

helpbut.png

 

Xbutton2::
ifexist, mw3.wav
 Soundplay, mw3.wav
else
 Msgbox, Sound file does not exist
return

 

I can't seem to get it to work. It still says it does not exist. :(

 

 

EDIT: Nevermind, got it to work when I moved the 2 files into Program Files/AutoHotKey/Extra/Scripts, but it wouldn't work while in the default script that run when you launch it. Thanks, anyway!

zuzmo.png

collio.png

[hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide][hide]

Never gonna give you up.[/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide][/hide]

"We don't want players to be able to buy their way to success in RuneScape. If we let players start doing this, it devalues RuneScape for others. We feel your status in real-life shouldn't affect your ability to be successful in RuneScape" Jagex 01/04/01 - 02/03/12

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.