Hawkwing Posted July 30, 2009 Share Posted July 30, 2009 How do you tell if a button was clicked with the right or left mouse button? The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
liten Posted July 30, 2009 Share Posted July 30, 2009 (edited) you could use these $GUI_EVENT_PRIMARYDOWN the primary mouse button was pressed. $GUI_EVENT_PRIMARYUP the primary mouse button was released. $GUI_EVENT_SECONDARYDOWN the secondary mouse button was pressed. $GUI_EVENT_SECONDARYUP the secondary mouse button was released. and set an Small invisible GUI over the button Something like this eample script gave to me some time ago, #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $hGUI1, $hGUI2 $hGUI1 = GUICreate('Test', 200, 200) GUISetState() $hGUI2 = GUICreate('', 100, 100, 50, 50, $WS_CHILD, 0, $hGUI1) GUISetState() While 1 Local $aMsg = GUIGetMsg(1) Switch $aMsg[0] Case $GUI_EVENT_PRIMARYUP If $aMsg[1] = $hGUI1 Then MsgBox(0, '', 'GUI1') Else MsgBox(0, '', 'GUI2') EndIf Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd tells if you clicked wiht the left mouse button down in the center of the GUI I TAKE NO CREDIT FORTHIS ahha Edited July 30, 2009 by liten My UDF:Freeze.au3-Freeze values like CE, ML, ETC[i][/i][u][/u] 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