SYRAU3 Posted May 20, 2012 Posted May 20, 2012 Hi all, how to use the secondary mouse button instead of the primary? #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 262, 173, 192, 124) $Button1 = GUICtrlCreateButton("Button1", 96, 64, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlDelete($Button1) EndSwitch WEnd for example, i need the button control to get deleted when the secondary mouse button is clicked on it.
Zedna Posted May 20, 2012 Posted May 20, 2012 #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> $Form1 = GUICreate("Form1", 262, 173, 192, 124) $Button1 = GUICtrlCreateButton("Button1", 96, 64, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch $info = GUIGetCursorInfo() If $info[4] = $Button1 And $info[3] = 1 Then GUICtrlDelete($Button1) WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search
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