Jump to content

Recommended Posts

Posted (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 by Guest
Posted (edited)

we do, well at least i think that i do

add GUISetState() before _GUICtrlMenu_TrackPopupMenu to see if it help

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 
Posted (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 by Guest

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...