Sign in to follow this  
Followers 0
the_lord_mephy

Events?

5 posts in this topic

Is there a way to either, set a mouse button to a hotkey, or find out when a mouse button is clicked?


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites



Beta _IsPressed('01') (Left button) _IsPressed('02') (Right Button)

Just put your condition statement in a loop.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Is that (function?) in an include? Sorry, I'm used to VB, but AutoIt is a lot simpler to do certain things.


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites

Here's an example:

dlibEnable('_AdlibManager', 10)

While 1
    Sleep(10000)
WEnd

Func _AdlibManager()
    _MouseFunctions('01', '02')
EndFunc

Func _MouseFunctions($vLeft, $vRight)
    If _IsPressed($vLeft) Then
        MsgBox(64, 'Info:', 'You pressed the left mouse button')
    ElseIf _IsPressed($vRight) Then
        MsgBox(64, 'Info:', 'You pressed the right mouse button')
    EndIf
EndFunc

Func _IsPressed($v_R, $v_dll = 'user32.dll')
    $v_R = DllCall($v_dll, 'int', 'GetAsyncKeyState', 'int', '0x' & $v_R)
    Return (Not @error And BitAND($v_R[0], 0x8000) = 0x8000) * 1
EndFunc   ;==>_IsPressed


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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