Created
August 27, 2021 18:49
-
-
Save cybardev/832c56779180e18558d2322419ac6728 to your computer and use it in GitHub Desktop.
Windows Terminal Dropdown
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
; variables to change | |
$termName = "wt.exe" ; terminal program | |
$tabName = "Kali" ; default tab name | |
$hotKey = "#`" ; dropdown hotkey | |
; start terminal and trigger dropdown | |
Run($termName) | |
WinWaitActive($tabName) | |
Send($hotKey) | |
WinWaitActive($tabName) | |
; check for dropdown | |
If WinGetPos($tabName)[0] < 0 Then | |
; hide dropdown then close window | |
Send($hotKey) | |
WinWaitActive($tabName) | |
WinClose($tabName) | |
Else | |
; close window then hide dropdown | |
WinClose($tabName) | |
WinWaitActive($tabName) | |
Send($hotKey) | |
EndIf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment