Icon in taskbar(toolbar)
Posted: 18 Oct 2016, 08:57
Is there any way to hide an icon of running programm in taskbar( or toolbar - i dont know how to call it in English. Nor tray )
Let's help each other out
https://www.autohotkey.com/boards/
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=24067
Code: Select all
Gui, +ToolWindow
Code: Select all
#Include TrayIcon.ahk
trayIcons := TrayIcon_GetInfo()
Loop, % trayIcons.MaxIndex()
if (trayIcons[A_Index].process = "skype.exe")
TrayIcon_Remove(trayIcons[A_Index].hwnd, trayIcons[A_Index].uid)
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
ITaskbarList := ComObjCreate("{56FDF344-FD6D-11d0-958A-006097C9A090}", "{56FDF342-FD6D-11d0-958A-006097C9A090}")
if (DllCall(NumGet(NumGet(ITaskbarList+0)+3*A_PtrSize), "Ptr", ITaskbarList) == 0) ; ITaskbarList::HrInit
{
if (DllCall("IsTopLevelWindow", "Ptr", (skypeHwnd := WinExist("Skype™ - ahk_class tSkMainForm")))) {
DllCall(NumGet(NumGet(ITaskbarList+0)+5*A_PtrSize), "Ptr", ITaskbarList, "Ptr", skypeHwnd) ; ITaskbarList::DeleteTab
/*
Sleep 1000
DllCall(NumGet(NumGet(ITaskbarList+0)+4*A_PtrSize), "Ptr", ITaskbarList, "Ptr", skypeHwnd) ; ITaskbarList::AddTab
*/
}
}
ObjRelease(ITaskbarList)