tqt129 Posted May 1, 2008 Share Posted May 1, 2008 what do i need to use if i want to play a sound file when holding down a key or mousebutton and stop it when i let go of that key Link to comment Share on other sites More sharing options...
Drew Posted May 1, 2008 Share Posted May 1, 2008 I would look into HotKeySet and SoundPlay In the helpfile. Hotkeyset may not be exactly what your after , but Its by far the simplest. Link to comment Share on other sites More sharing options...
tqt129 Posted May 1, 2008 Author Share Posted May 1, 2008 I would look intoHotKeySetandSoundPlay In the helpfile. Hotkeyset may not be exactly what your after , but Its by far the simplest.I was using this but this only respond to keypress and i need something that is press/hold and if i release it would stop sound.HotKeySet("g","g_pressed")while 1Sleep(10)WEndFunc g_pressed()SoundPlay("blah.wav",1)EndFunc Link to comment Share on other sites More sharing options...
Drew Posted May 1, 2008 Share Posted May 1, 2008 Maybe _IsPressed? Link to comment Share on other sites More sharing options...
tqt129 Posted May 1, 2008 Author Share Posted May 1, 2008 Maybe _IsPressed?where can i get the keycodes numbers for the all the keys and mouse? Link to comment Share on other sites More sharing options...
Drew Posted May 1, 2008 Share Posted May 1, 2008 That I'm unsure of. I'll try to find that for you real fast. Link to comment Share on other sites More sharing options...
Drew Posted May 1, 2008 Share Posted May 1, 2008 Alright man , open up your HelpFile and type: ASCII Click the one that gives you the list . Link to comment Share on other sites More sharing options...
tqt129 Posted May 1, 2008 Author Share Posted May 1, 2008 Alright man , open up your HelpFile and type:ASCIIClick the one that gives you the list .hmmm nothing for mouse4 or mouse5 huh Link to comment Share on other sites More sharing options...
Drew Posted May 1, 2008 Share Posted May 1, 2008 (edited) What Are Mouse4 and 5? edit Might be called something else , what are they? Edited May 1, 2008 by Drew Link to comment Share on other sites More sharing options...
tqt129 Posted May 1, 2008 Author Share Posted May 1, 2008 What Are Mouse4 and 5?editMight be called something else , what are they? lol are you asking me what they are? mouse4 and moue5 you know the side buttons on the mouse Link to comment Share on other sites More sharing options...
Drew Posted May 1, 2008 Share Posted May 1, 2008 I don't have those buttons. I just have left click , right click , mouse wheel. Link to comment Share on other sites More sharing options...
d4rk Posted May 1, 2008 Share Posted May 1, 2008 lol are you asking me what they are? mouse4 and moue5 you know the side buttons on the mousecan you give a screenshot ? [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
tqt129 Posted May 1, 2008 Author Share Posted May 1, 2008 screen shot of my mouse? i think you lil confuse right now. Link to comment Share on other sites More sharing options...
Drew Posted May 1, 2008 Share Posted May 1, 2008 I got an idea. Write a simple program that asks the user to press a key , and whatever it is they press is stored as a variable. Such as $Var Than, do something like MsgBox( 0, "Button", "The button you pressed was: "&$Var) I'm not sure, but I'm trying to come up with something to help you. I was hoping someone who knew the language a bit better would post... But I guess everyone went to sleep . Link to comment Share on other sites More sharing options...
MerkurAlex Posted May 1, 2008 Share Posted May 1, 2008 (edited) @Drew Some mice have a few extra buttons on the side. @tqt129 As far as i can remember 01=left 02=right and 03=middle so try going above those and testing your buttons thats all i can think of test test test good luck. EDIT I attached an old autoit documentation file that will hopefully be of some use it has all the ascii chars in it i believe including the mouse buttons._IsPressed.htm Edited May 1, 2008 by EagleClaw [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
tqt129 Posted May 3, 2008 Author Share Posted May 3, 2008 @DrewSome mice have a few extra buttons on the side.@tqt129As far as i can remember 01=left 02=right and 03=middle so try going above those and testing your buttons thats all i can think of test test test good luck.EDITI attached an old autoit documentation file that will hopefully be of some use it has all the ascii chars in it i believe including the mouse buttons.that DOC helped. side button is 05 and 06. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now