Jump to content
Sign in to follow this  

How to create select menu

Recommended Posts

Dear All,

Sorry, I am new in AutoIT.

I am creating a Auto test menu, but I am not sure how to and I search "Help" for sometimes and still not got any clue. Could anyone help me or share me with some sample GUI menu, thank you.

Share this post

Link to post
Share on other sites

Simple Menu:

$ContextMenu = GUICtrlCreateContextMenu()
   $RefreshContext = GUICtrlCreateMenuItem("Refresh", $ContextMenu)
  $FileMenu = GUICtrlCreateMenu("File")
   $SaveItem = GUICtrlCreateMenuItem("Save", $FileMenu)
   $RefreshItem = GUICtrlCreateMenuItem("Refresh", $FileMenu)
   GUICtrlCreateMenuItem("", $FileMenu)
   $ExitItem = GUICtrlCreateMenuItem("Exit", $FileMenu)
  $ToolsMenu = GUICtrlCreateMenu("Utilites")
   $DriveMenu = GUICtrlCreateMenu("Drives", $ToolsMenu)
    $RecycleItem = GUICtrlCreateMenuItem("Delete Trash Files", $DriveMenu)
    $DriveInfoItem = GUICtrlCreateMenuItem("Details on Drive...", $DriveMenu)
   $DisplayMenu = GUICtrlCreateMenu( "Display", $ToolsMenu)
    $PixelFixItem = GUICtrlCreateMenuItem( "Pixel Fixer", $DisplayMenu)
   $CPUMenu = GUICtrlCreateMenu("CPU", $ToolsMenu)
    $StressItem = GUICtrlCreateMenuItem( "Stress Test", $CPUMenu)
   $ETCMenu = GUICtrlCreateMenu("Etc", $ToolsMenu)
    $USBHijack = GUICtrlCreateMenuItem("Remove USB Hijack Risks", $ETCMenu)
  $HelpMenu = GUICtrlCreateMenu("About")
   $CreditsItem = GUICtrlCreateMenuItem( "Credits", $HelpMenu)

Advanced menu with better performance:

$Menu[0] = GUICtrlCreateMenu("File")
   $Item_Hide = GUICtrlCreateMenuItem("Minimize", $Menu[0], 1)
    GUICtrlCreateMenuItem("", $Menu[0], 2)
   $Item_Exit = GUICtrlCreateMenuItem("Exit", $Menu[0], 3)
  $Menu[1] = GUICtrlCreateMenu("Options")
   $Menu[2] = GUICtrlCreateMenu("Don't Allow", $Menu[1], 1)
    $Item_Block[0] = GUICtrlCreateMenuItem("Any", $Menu[2], 1)
    GUICtrlCreateMenuItem("", $Menu[2], 2)
    $Item_Block[1] = GUICtrlCreateMenuItem("Command Prompt", $Menu[2], 3)
    $Item_Block[2] = GUICtrlCreateMenuItem("Shutdown", $Menu[2], 4)
    $Item_Block[3] = GUICtrlCreateMenuItem("Task Manager", $Menu[2], 5)
   $Menu[3] = GUICtrlCreateMenu("On Startup", $Menu[1], 2)
    $Item_Start[0] = GUICtrlCreateMenuItem("Lock URSafe", $Menu[3], 1)
    $Item_Start[1] = GUICtrlCreateMenuItem("Update URSafe", $Menu[3], 2)
   $Menu[4] = GUICtrlCreateMenu("Refresh Every", $Menu[1], 3)
    $Item_Reset_Five = GUICtrlCreateMenuItem("05 seconds", $Menu[4], 1, 1)
    $Item_Reset_Ten = GUICtrlCreateMenuItem("10 seconds", $Menu[4], 2, 1)
    $Item_Reset_Twenty = GUICtrlCreateMenuItem("20 seconds", $Menu[4], 3, 1)
  $Menu[5] = GUICtrlCreateMenu("Help")
   $Item_Credits = GUICtrlCreateMenuItem("Credits", $Menu[5], 1)
    GUICtrlCreateMenuItem("", $Menu[5], 2)
   $Item_Math_Unlock = GUICtrlCreateMenuItem("Math Unlock", $Menu[5], 3)
    GUICtrlCreateMenuItem("", $Menu[5], 4)
   $Menu[6] = GUICtrlCreateMenu("Online", $Menu[5], 5)
    $Item_Changelog = GUICtrlCreateMenuItem("Changelog", $Menu[6], 1)
    $Item_Feedback = GUICtrlCreateMenuItem("Feedback", $Menu[6], 2)
;   $Item_Manual = GUICtrlCreateMenuItem("Manual", $Menu[6], 3)
    $Item_Update = GUICtrlCreateMenuItem("Update", $Menu[6], 4)
Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF


Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...