Jump to content

Recommended Posts

Posted
$ButtonText = "Notepad" ;Change to notepad title
Run("notepad.exe", @WindowsDir, @SW_MINIMIZE)
WinWait("[Class:Notepad]")
$hParent = WinGetHandle("[Class:Shell_TrayWnd]")
$hToolBar = ControlGetHandle($hParent, "", "ToolbarWindow322")

;MsgBox(0, "Warning", "Now we hide the Notepad button on taskbar")

$count = _GUICtrlToolbar_ButtonCount($hToolBar)
For $i = 0 To $count - 1
    $ID = _GUICtrlToolbar_IndexToCommand($hToolBar, $i)

    If StringInStr(_GUICtrlToolbar_GetButtonText($hToolBar, $ID), $ButtonText) Then
        _GUICtrlToolbar_SetButtonState($hToolBar, $ID, $TBSTATE_HIDDEN)
        ExitLoop
    EndIf
Next

Hello, 

This scripts works in windows xp , but i tried in W7 64 and it doesnt work removing the taskbar icon selected from $Buttontext.

I checked with autoIt windows info and it shows MSTaskListWClass1 but it doesnt works. Any way to remove one icon program in taskbar?.

Best Regards.

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
×
×
  • Create New...