Sign in to follow this  
Followers 0
DCCD

Hide Taskbar Button - The Easy Way!

7 posts in this topic

#1 ·  Posted (edited)

My Script Ready to compile And I don't Wanna the Taskbar to show it, i know you can do it like this

But is there another way, the easyway like #NoTrayIcon

#Include <GuiToolBar.au3>
WinWaitActive("Untitled - Notepad")
_TaskbarHideButton("Untitled - Notepad")

Func _TaskbarHideButton($sText, $bHide = True)
    $hToolbar = _GUICtrlToolbar_FindToolbar("[CLASS:Shell_TrayWnd]", $sText)
    If $hToolbar = 0 Then Return False
    For $i = 0 To _GUICtrlToolbar_ButtonCount($hToolbar)-1
        $cId = _GUICtrlToolbar_IndexToCommand($hToolbar, $i)
        If _GUICtrlToolbar_GetButtonText($hToolbar, $cId) = $sText Then
            Return _GUICtrlToolbar_HideButton($hToolbar, $cId, $bHide)
        EndIf
    Next
    Return False
EndFunc
Edited by DCCD

Share this post


Link to post
Share on other sites



The only problem, The button appears for a second ,

All I Wanna Do Hide AutoIt v3 Script Button, Not for Notepad or any other exe

any idea?

#Include <GuiToolBar.au3>
WinWaitActive("Untitled - Notepad")
_TaskbarHideButton("Untitled - Notepad")

Func _TaskbarHideButton($sText, $bHide = True)
    $hToolbar = _GUICtrlToolbar_FindToolbar("[CLASS:Shell_TrayWnd]", $sText)
    If $hToolbar = 0 Then Return False
    For $i = 0 To _GUICtrlToolbar_ButtonCount($hToolbar)-1
        $cId = _GUICtrlToolbar_IndexToCommand($hToolbar, $i)
        If _GUICtrlToolbar_GetButtonText($hToolbar, $cId) = $sText Then
            Return _GUICtrlToolbar_HideButton($hToolbar, $cId, $bHide)
        EndIf
    Next
    Return False
EndFunc

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

DCCD

This?

#NoTrayIcon
#include <GuiConstantsEx.au3>

$dummy = GUICreate("dummy")

$hGUI = GUICreate("Test GUI", 300, 200, -1, -1, -1, -1, $dummy)

GUISetState()

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Or, why not like this?

#NoTrayIcon

$hGUI = GUICreate("Test GUI", 300, 200, -1, -1, -1, -1, WinGetHandle("[CLASS:Progman]"))

GUISetState()

Do
Until GUIGetMsg() = -3

:mellow:

Edited by FreeFry

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
Sign in to follow this  
Followers 0