Guest Posted September 15, 2012 Share Posted September 15, 2012 (edited) I Found on Google the code I'm looking for. This code: #include <GUIMenu.au3> #include <File.au3> #include <WindowsConstants.au3> Local $GUIContextMenu = GUICreate("Context Menu", -1, 1, -5, -5, $WS_POPUP, $WS_EX_TOOLWINDOW) local $MainContextMenu = GUICtrlCreateContextMenu() $LvL1 = GUICtrlCreateMenu("LvL1", $MainContextMenu) $LvL2 = GUICtrlCreateMenu("LvL2", $LvL1) $ret = _GUICtrlMenu_TrackPopupMenu(GUICtrlGetHandle($MainContextMenu), $GUIContextMenu, 250, 250, 1, 1, 2) I cleaned up the code to make it basic. This code does Almost what I need. The problem is that if I run the code so if I click the mouse anywhere else, then the menu does not disappear. The menu disappears only if I first click on something on the menu and then click anywhere else. What should I do? I hope you understand .. Edited September 15, 2012 by Guest Link to comment Share on other sites More sharing options...
bogQ Posted September 15, 2012 Share Posted September 15, 2012 (edited) we do, well at least i think that i do add GUISetState() before _GUICtrlMenu_TrackPopupMenu to see if it help Edited September 15, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Guest Posted September 16, 2012 Share Posted September 16, 2012 (edited) Thank you. There is another problem. Once the menu is up, the window is not active .. I do not want to use each time the command WinActivate Because it does not work well on Microsoft Word.. What needs to change? Edited September 16, 2012 by Guest 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