Problem with taskbar persistently showing after running this script Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Kotte
Posts: 46
Joined: 03 May 2021, 08:33

Problem with taskbar persistently showing after running this script

05 Nov 2022, 12:12

CAUTION! Do not run this script if you do not know how to fix the taskbar problem stated below!

Hi! I'm trying to hide the taskbar in Windows 10. I found this (viewtopic.php?p=487232#p487232) post by Rohwedder that does this. The problem I am having is to get back "normal" functionality of the taskbar after terminating the script.

Code: Select all

#NoEnv
#Persistent
#SingleInstance Force

OnExit("ExitFunc") ; Taskbar appears when terminating the script.

ExitFunc(ExitReason, ExitCode)
{
    if ExitReason not in Logoff,Shutdown
		WinShow, ahk_class Shell_TrayWnd
}

; Hide taskbar until mouse hovers over bottom of screen
SetTimer, SysTray, 500
SysTray:
CoordMode, Mouse, Screen
MouseGetPos,, Y
IF (40 > A_ScreenHeight - Y)
	WinShow, ahk_class Shell_TrayWnd
Else
	WinHide, ahk_class Shell_TrayWnd
Return
In this version the taskbar appears upon exiting the script, but it does not behave as I'd expect. It shows the taskbar persistently even if I set the taskbar to automatically hide (in Windows settings). Does anyone know how to tweak ExitFunc so that the taskbar reappears but is hidden (standard Windows version of hidden that shows lines at the bottom) upon exiting the script?
Kotte
Posts: 46
Joined: 03 May 2021, 08:33

Re: Problem with taskbar persistently showing after running this script

05 Nov 2022, 14:36

@mikeyww So the taskbar hides/shows normally after you terminate this script? I had to restart my computer to make it stop showing the taskbar.
User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Problem with taskbar persistently showing after running this script

05 Nov 2022, 14:37

Yes, if it was set to do that.

Code: Select all

Operating system           : Microsoft Windows 10 Pro
OS version                 : 10.0.19044
PC model                   : ASUS EXPERTBOOK B9400CEAV_B9450CEA
CPU                        : Intel64 Family 6 Model 140 Stepping 1
OS bitness                 : 64
CPU bitness                : 64
BIOS manufacturer          : ASUSTeK COMPUTER INC.
BIOS name                  : B9400CEAV.308
Motherboard manufacturer   : ASUSTeK COMPUTER INC.
Motherboard product        : B9400CEAV
Motherboard version        : 1.0       
Display                    : Citrix Indirect Display Adapter
Display width              : 1920
Display height             : 1080
DPI                        : 144
AHK version                : 1.1.35.00
Kotte
Posts: 46
Joined: 03 May 2021, 08:33

Re: Problem with taskbar persistently showing after running this script

05 Nov 2022, 14:51

@mikeyww Haha, it works for me now too! So I might have a bug somewhere that will be a nightmare trying to find, if it exists :D Maybe the restart fixed something. Anyways, thanks for taking the time!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk and 334 guests