Ran into a need to produce a lite program to hide command windows while I ran other scripts. So I produced the following:
HideCmdWindowEvery3Sec.exe: https://panaconsulting.box.com/s/b6cd69dyakpa3a1vi2xe
As named, It runs in the background and minimizes any command prompt windows that appear on-screen.
Here is an example batch file utilizing the program:
start "" "%~dp0HideCmdWindowEvery3Sec.exe"
start /w "" "%~dp0Install.vbs"
start /w "" TASKKILL /F /IM HideCmdWindowEvery3Sec.exe
Autoit Source Code:
Opt("WinTitleMatchMode", 2)
$i = 0
Do
If NOT (WinGetState("[CLASS:ConsoleWindowClass]") = "16") Then ; If window is not Minimized
WinSetState(WinGetTitle("[CLASS:ConsoleWindowClass]"), "", @SW_MINIMIZE)
EndIf
Sleep(3000) ; 3 second delay
Until $i = 10 ; Enless Loop
Also, here is the GitHub link to the script: https://github.com/brianfgonzalez/Scripts/blob/e6287ccbcd07efeb3e8a270d1e6e4e25d846c6f9/HideCmdWindowEvery3Sec.au3
-BG
Perfect for my requirement…Thanks