With Hotkey Ctrl + Alt + M :
- When app is not running, open it.
- When app window is minimized, restore and activate it.
- When app window is activated, minimize it.
Code: Select all
^!m::toggleSpotifyMusic()
toggleSpotifyMusic() {
spotityWinTitle := "ahk_exe Spotify.exe"
if (WinExist(spotityWinTitle)) {
if (WinActive(spotityWinTitle)) {
WinMinimize
} else {
WinRestore
WinActivate
}
} else {
Run, %A_AppData%\Spotify\Spotify.exe
}
}