Exit Posted January 13, 2014 Share Posted January 13, 2014 (edited) Edit: User error. Mousetrap() area was in menu bar when using AERO. Show menu is correct in this case.Running in a non AERO mode, all is OK.But in AERO mode, the mouseclicks are not recogniced and behave as default. e.g. right click opens menu.Here a small reproducer of the problem.Just switch between non-aero and aero mode. Non-aero first to see (hear) the desired result. #include <GUIConstants.au3> #include <Misc.au3> $GUI = GUICreate("Aero Mouse Tester( ESC = Exit ) ", 400, 60) $LabelId = GUICtrlCreateLabel("right mouseclick please", 10, 10, 380, 180, 1) GUICtrlSetFont($LabelId, 20) GUIRegisterMsg($WM_RBUTTONDOWN, "Work") GUISetState() $coords = WinGetPos($GUI) _MouseTrap($coords[0] + 200, $coords[1] + 23, $coords[0] + 205, $coords[1] + 25) $OVoice = ObjCreate("SAPI.SpVoice") $OVoice.Speak("right mouseclick please") While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd Func Work($hWndGui, $MsgId, $WParam, $LParam) $OVoice.Speak("right") EndFunc ;==>Work Any idea how to fix this in AERO mode ? Edit: Changed title from TrackMouseEvent() to GUIRegisterMsg(). Stripped code to minimum Edited January 14, 2014 by Exit App: Au3toCmd UDF: _SingleScript() 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