Icon in taskbar(toolbar)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
fedek
Posts: 60
Joined: 17 May 2016, 12:17
Contact:

Icon in taskbar(toolbar)

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 )
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Icon in taskbar(toolbar)

18 Oct 2016, 09:31

Please excuse my spelling I am dyslexic.
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Icon in taskbar(toolbar)

20 Oct 2016, 14:55

I doubt this is the best approach, but you can make your window a ToolWindow.

Code: Select all

Gui, +ToolWindow
Please excuse my spelling I am dyslexic.
User avatar
tidbit
Posts: 1272
Joined: 29 Sep 2013, 17:15
Location: USA

Re: Icon in taskbar(toolbar)

20 Oct 2016, 18:53

gui, +owner
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
fedek
Posts: 60
Joined: 17 May 2016, 12:17
Contact:

Re: Icon in taskbar(toolbar)

21 Oct 2016, 13:14

Could you write a script which will hide skype`s icon in Toolbar, please?
User avatar
tidbit
Posts: 1272
Joined: 29 Sep 2013, 17:15
Location: USA

Re: Icon in taskbar(toolbar)

21 Oct 2016, 13:36

hiding another programs? that won't be so straight forward (I have no idea how. seems quite complex). Capn Odin & mine were for gui's made in AHK.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
fedek
Posts: 60
Joined: 17 May 2016, 12:17
Contact:

Re: Icon in taskbar(toolbar)

22 Oct 2016, 08:17

Ok, how to hide skype for example?
drawback
Posts: 34
Joined: 11 Aug 2016, 11:31

Re: Icon in taskbar(toolbar)

22 Oct 2016, 08:59

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)

fedek
Posts: 60
Joined: 17 May 2016, 12:17
Contact:

Re: Icon in taskbar(toolbar)

23 Oct 2016, 05:54

Works only with tray. :/
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Icon in taskbar(toolbar)

23 Oct 2016, 09:30

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)
EDIT: Can be found in the official documentation, too: DllCall#Examples

Even better: Skype->Tools->Options->Advanced->[ ] Keep Skype in the taskbar while [you're] signed in...

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gongnl, marypoppins_1, mikeyww, Rohwedder, RussF and 133 guests