Jump to content

Search the Community

Showing results for tags 'sysmenu'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Found 1 result

  1. I'm trying to add an item to the system menu of another application. No problem. But the following pice of code works without returning any menu items. I don't think that the problem has been adressed this way anywhere else. At least i couldn't find something usable. We had an example with a standard menu (the example used was modified from that) and there's AnyGui, but that does not offer the desired functions. This seems quite a bit of a challenge. Here's the code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiMenu.au3> Run("Notepad.exe") WinWaitActive("[CLASS:Notepad]") $hGUI = WinGetHandle("[CLASS:Notepad]") $hSystemMenu = _GUICtrlMenu_GetSystemMenu($hGUI) _GUICtrlMenu_AppendMenu($hSystemMenu, $MF_SEPARATOR, 0, "") _GUICtrlMenu_AppendMenu($hSystemMenu, $MF_STRING, 0x3000, "New Sysmenu Item") GUIRegisterMsg($WM_SYSCOMMAND, "_WM_SYSCOMMAND") $sMenuSelection = "" While WinExists($hGUI) If $sMenuSelection <> "" Then MsgBox(0, "New Menu", "You selected " & $sMenuSelection) $sMenuSelection = "" EndIf WEnd Func _WM_SYSCOMMAND($hGUI, $iMsg, $wParam, $lParam) If $iMsg = $WM_SYSCOMMAND Then If _WinAPI_LoWord($wParam) = 0x3000 Then $sMenuSelection = "New Sysmenu Item" EndIf EndIf EndFunc
  • Create New...