AutoIt – Minimize and Restore Window

email me

It’s best to separate these events into two separate files. Compile to x86 EXE. Call to minimize.exe in your scripts.


; Hide the tray icon.
Opt("TrayIconHide", 1)

WinSetState("Title of your Window","",@SW_MINIMIZE)
Run("taskkill /f /im restore.exe", "", @SW_MINIMIZE)
Run("restore.exe", "", @SW_SHOWMAXIMIZED)



; Hide the tray icon.
Opt("TrayIconHide", 1)

sleep(20000);20 seconds
;sleep(86400000); 24 hours
WinSetState("Title of your Window","",@SW_RESTORE)



;@SW_HIDE = Hide window
; @SW_SHOW = Shows a previously hidden window
; @SW_MINIMIZE = Minimize window
; @SW_MAXIMIZE = Maximize window
; @SW_RESTORE = Undoes a window minimization or maximization
; @SW_DISABLE = Disables the window
; @SW_ENABLE = Enables the


tags: MrNetTek