Jump to content

hide taskbar from external program!

Recommended Posts



I want to remove the taskbar from one external program that i am automating with autoit.

I have the problem that when I execute the program with command Run, appear 2 previous windows before to the main program window.

In these two windows I need to accept and push ok. When I use the code below at the first window it works fine. But when appear the second appear again the taskbar program icon.

And when click again, appear again until the main window appear and then i can remove it. again.

#include <GuiToolBar.au3>

; Run Software with the window normal.

WinWaitActive("[CLASS:TFormActivation]", "", 10)

$hParent = WinGetHandle("[Class:Shell_TrayWnd]")
$hToolBar = ControlGetHandle($hParent, "", "ToolbarWindow322")
$ButtonText = "MY PROGRAM NAME" ; Taskbar title

$count = _GUICtrlToolbar_ButtonCount($hToolBar)

;_GUICtrlToolbar_SetButtonState($hToolBar, 6, $TBSTATE_HIDDEN)
For $i = 1 To $count - 1 Step 2
    $ID = _GUICtrlToolbar_IndexToCommand($hToolBar, $i)
    If StringInStr(_GUICtrlToolbar_GetButtonText($hToolBar, $ID), $ButtonText) Then
        _GUICtrlToolbar_SetButtonState($hToolBar, $ID, $TBSTATE_HIDDEN)

Any way to to this code with one loop until after appear the main program window?. For loop or similar to while the code of script is executing the loop will check constantelly if the window appear again...


And another thing. Are there any way to hide completely the window?. It appears  around 1 second and later hide it.  I would like the window no appear any time. is not it possible with autoit?.



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


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.