Jump to content

Menu Item From A Menu Item


Recommended Posts

Can a menu item from a menu item be possible?

For example, a browser will the Menu 'File' > 'Options' > 'Options Here'

I thought you could do it like this, but it did not work:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 505, 302, 192, 124)
$Menu = GUICtrlCreateMenu("File")
$Options = GUICtrlCreateMenuItem("Options", $Menu)
$Option1 = GUICtrlCreateMenuItem("Option1", $Options)
GUISetState(@SW_SHOW)



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Is there a way to do this?

Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 505, 302, 192, 124)
$Menu = GUICtrlCreateMenu("File")
$Options = GUICtrlCreateMenu("Options", $Menu,1)
$Option1 = GUICtrlCreateMenuItem("Option1", $Options)
GUISetState(@SW_SHOW)



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 505, 302, 192, 124)
$Menu = GUICtrlCreateMenu("File")
$Options = GUICtrlCreateMenu("Options", $Menu,1)
$Option1 = GUICtrlCreateMenuItem("Option1", $Options)
GUISetState(@SW_SHOW)



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Thank you. That's exactly what I was looking for.
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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