Skip to content

Instantly share code, notes, and snippets.

@kissgyorgy
kissgyorgy / enable_disable_buttons.au3
Last active July 1, 2021 00:57
AutoIt: Enable or Disable Window buttons via DllCall()
; Original script: http://www.autoitscript.com/forum/topic/100125-disable-close-button/#entry716490
; USer32.dll functions: http://msdn.microsoft.com/en-us/library/ms647985(v=vs.85).aspx
; "The first script ( remove the button ) work fine on XP, the second ( the disable script ) disable only the close button, i have tested both version, the dll and the GuiMenu"
; See http://www.autoitscript.com/forum/topic/147424-disable-or-remove-close-minimize-maximize-buttons-on-any-window-in-runtime/#entry1045390
; ---------------------------------------
#include <GuiMenu.au3>
Run("Notepad")
WinWait("Untitled - Notepad")