Created
October 31, 2021 18:39
-
-
Save JoeGlines/c8f42de134b5ffb3211bba3fcf972ff9 to your computer and use it in GitHub Desktop.
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
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
;******************************************************* | |
#SingleInstance,Force | |
;************************************** | |
!p::ToggleVisibility("Pushbullet Pro") ;Alt+P will run | |
;~ WindowTitle:="Pushbullet Pro" | |
;~ ToggleVisibility(WindowTitle) ;Call the function | |
return | |
;********************Defining the Function*********************************** | |
ToggleVisibility(WindowTitle){ | |
WinGet WinStatus, MinMax,% WindowTitle | |
IfEqual WinStatus,-1,WinRestore ,% WindowTitle ;If the widnow is minimized->Restore | |
IfEqual WinStatus, 1,WinRestore ,% WindowTitle ;if the window is maximized->Restore | |
IfEqual WinStatus, 0,WinMinimize,% WindowTitle ;The window is neither minimized nor maximized=>Minimize it | |
} | |
;~ return | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment