Jump to content

Hide Taskbar Button - The Easy Way!


DCCD
 Share

Recommended Posts

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
Link to comment
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
Link to comment
Share on other sites

Thanks alot,, This is exactly what I'm talking about :mellow:

#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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...