Meinst du so?
AutoIt
Opt('MustDeclareVars', 1)
#include <GUIConstantsEx.au3>
Global Const $hGUI = GUICreate("Test", 500, 500)
Global Const $mM1 = GUICtrlCreateMenu("Menü1")
Global Const $mM2 = GUICtrlCreateMenuItem("Menü2", $mM1)
Global Const $mExit = GUICtrlCreateMenuItem("Exit", $mM1)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $mExit
Exit
Case $mM1
MsgBox(0, "1", "I can be actioned!")
Case $mM2
MsgBox(0, "2", "I can be actioned!")
EndSwitch
WEnd
Alles anzeigen
Mist BananaJoe war schneller