Sign in to follow this  
Followers 0
Orgins

Can you do IsPressed with the mouse buttons?

6 posts in this topic

I just wanna do a simple :

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1

Sleep ( 250 )

If _IsPressed("Left mouse", $dll) Then

Do something

ExitLoop

EndIf

WEnd

DllClose($dll)

But I don't think there is a hex (?) number for it.

If I can't use _IsPressed what other command could I use?


I'm a newbie.Sorry if I don't reposed to your replays very fast.

Share this post


Link to post
Share on other sites



The hex number for the left mouse button is "01" :)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I normally get the number to use from the autoit help ASCII Character Codes and its says 01 is "SOH 1 01 Start of heading, = console interrupt "

I guess it might be it. I'll try it.

/e it worked

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Share this post


Link to post
Share on other sites

I normally get the number to use from the autoit help ASCII Character Codes and its says 01 is "SOH 1 01 Start of heading, = console interrupt "

Check the help entry for _IsPressed instead, it has all the keys in the remarks section :)

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

is it possible to discard pressed key with _ispressed as it would discard the key with hotkeyset?

I mean, I need something like:

If _IsPressed(05) Then
        Send("{F1}ž")
        Sleep(800)
        Send("{F4}")
EndIf

If I press mouse button 5 it sends 'button5 F1 ž F4'

and I need only to send 'F1 ž F4'

Thx for advices


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  
Followers 0