How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DeepMind
Posts: 271
Joined: 19 Jul 2016, 14:47

How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

05 Aug 2016, 09:01

yeah, like i said i want nothing appears in taskbar and in Alt+Tab switch but still whenever i click the hotkey that i defined i can bring the window up. and the window I want to do this to, is notepad
User avatar
niczoom
Posts: 78
Joined: 09 Mar 2016, 22:17

Re: How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

31 May 2017, 06:14

I was looking to do the same/similar. I pulled the following code from here https://autohotkey.com/board/topic/8107 ... es-in-ahk/.

Code: Select all

#SingleInstance Force
#Persistent

IID := "{56FDF342-FD6D-11d0-958A-006097C9A090}", CLSID := "{56FDF344-FD6D-11d0-958A-006097C9A090}", S_OK := 0x00

ptr := ComObjCreate(CLSID, IID)
vtbl := NumGet(ptr + 0, 0, "Ptr")

hrInit := NumGet(vtbl + 0, 3 * A_PtrSize, "Ptr")
addTab := NumGet(vtbl + 0, 4 * A_PtrSize, "Ptr")
deleteTab := NumGet(vtbl + 0, 5 * A_PtrSize, "Ptr")

if (DllCall(hrInit, "Ptr", ptr) != S_OK)
{
MsgBox Error!
ExitApp
}

WinGet, WMC_ID, ID, ahk_exe ehshell.exe
DllCall(deleteTab, "Ptr", ptr, "Ptr", WMC_ID)
I was looking to hide my Windows Media Centers button on the taskbar and from the Alt-Tab menu, this accomplishes it whilst still leaving the window accessible from my AHK script.

To bring the button back just add

Code: Select all

DllCall(addTab, "Ptr", ptr, "Ptr", WMC_ID)
.

Works a treat.
[AHK] 1.1.23.05 x32 Unicode
[WIN] 10 Pro x64 Version 5111 (Build 10586.218)
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

02 Jun 2017, 23:20

@niczoom
For me, on Windows 7, Aero mode off, that script seemed to remove the taskbar button but not the alt-tab button. Nice script though.

I tried many things (re. window styles/ex. styles, owner/parent), the only thing I have so far:

Code: Select all

q:: ;hide from alt-tab menu
;works but changes the title bar appearance:
WinSet, ExStyle, % +0x80, ahk_class Notepad ;WS_EX_TOOLWINDOW := 0x80
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
niczoom
Posts: 78
Joined: 09 Mar 2016, 22:17

Re: How can i remove a window from taskbar and Alt+Tab window but still have access to it through an hotkey?

04 Jun 2017, 08:57

Not sure why it left your Alt-Tab and/or Win-Tab button/image still visible, I'm using Win 10 and do not have this problem.
[AHK] 1.1.23.05 x32 Unicode
[WIN] 10 Pro x64 Version 5111 (Build 10586.218)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 179 guests