Jump to content
Sign in to follow this  
tqt129

key or mouse press help

Recommended Posts

tqt129

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

Share this post


Link to post
Share on other sites
Drew

I would look into

HotKeySet

and

SoundPlay

In the helpfile. Hotkeyset may not be exactly what your after , but Its by far the simplest.

Share this post


Link to post
Share on other sites
tqt129

I would look into

HotKeySet

and

SoundPlay

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 1

Sleep(10)

WEnd

Func g_pressed()

SoundPlay("blah.wav",1)

EndFunc

Share this post


Link to post
Share on other sites
tqt129

Maybe _IsPressed?

where can i get the keycodes numbers for the all the keys and mouse?

Share this post


Link to post
Share on other sites
Drew

That I'm unsure of. I'll try to find that for you real fast.

Share this post


Link to post
Share on other sites
Drew

Alright man , open up your HelpFile and type:

ASCII

Click the one that gives you the list :).

Share this post


Link to post
Share on other sites
tqt129

Alright man , open up your HelpFile and type:

ASCII

Click the one that gives you the list :).

hmmm nothing for mouse4 or mouse5 huh

Share this post


Link to post
Share on other sites
Drew

What Are Mouse4 and 5?

edit

Might be called something else , what are they?

Edited by Drew

Share this post


Link to post
Share on other sites
tqt129

What Are Mouse4 and 5?

edit

Might 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

Share this post


Link to post
Share on other sites
Drew

I don't have those buttons. I just have left click , right click , mouse wheel. :)

Share this post


Link to post
Share on other sites
d4rk

lol are you asking me what they are? mouse4 and moue5 you know the side buttons on the mouse

can 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

Share this post


Link to post
Share on other sites
tqt129

screen shot of my mouse? i think you lil confuse right now.

Share this post


Link to post
Share on other sites
Drew

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 :).

Share this post


Link to post
Share on other sites
MerkurAlex

@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 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]

Share this post


Link to post
Share on other sites
tqt129

@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.

that DOC helped. side button is 05 and 06.

Share this post


Link to post
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
Sign in to follow this  

×