Last active
September 15, 2025 13:51
-
-
Save AyzekUorren/a25482ac3ef6f721b836a7ad48fe543a to your computer and use it in GitHub Desktop.
Simple script to hide / show windows taskbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ctypes | |
| import keyboard | |
| FindWindow = ctypes.windll.user32.FindWindowW | |
| ShowWindow = ctypes.windll.user32.ShowWindow | |
| TASKBAR = FindWindow("Shell_TrayWnd", None) | |
| START_BUTTON = FindWindow("Button", None) | |
| visible = True | |
| def toggle_taskbar(): | |
| global visible | |
| if visible: | |
| ShowWindow(TASKBAR, 0) | |
| ShowWindow(START_BUTTON, 0) | |
| else: | |
| ShowWindow(TASKBAR, 5) | |
| ShowWindow(START_BUTTON, 5) | |
| visible = not visible | |
| keyboard.add_hotkey('ctrl+alt+t', toggle_taskbar) | |
| keyboard.wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment