Jump to content

Recommended Posts

Posted

hello

if i right click in the gui, the context menu pops up.

how can i check if a context menu is visible?

 

GUICreate("My GUI Context Menu", 300, 200)
Local $idContextmenu = GUICtrlCreateContextMenu()
Local $idNewsubmenu = GUICtrlCreateMenu("new", $idContextmenu)
Local $idNewsubmenuText = GUICtrlCreateMenuItem("text", $idNewsubmenu)

GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $idNewsubmenuText
            MsgBox(0, "SubMenu Selected", 'Text')
    EndSwitch
WEnd

 

 

Posted (edited)
1 hour ago, bladem2003 said:

how can i check if a context menu is visible?

Maybe the Help file can shed some light... (Hint:  Look for the bold letters) 

https://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetState.htm

 

Edited by TheXman

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
×
×
  • Create New...