Skip to content

Instantly share code, notes, and snippets.

@aejay
Created December 20, 2012 13:51
Show Gist options
  • Save aejay/4345424 to your computer and use it in GitHub Desktop.
Save aejay/4345424 to your computer and use it in GitHub Desktop.
I'm tired of not being able to use Aero's Snap feature on Spotify's window in Win7 and Win8. This AutoHotKey script will perform a fix to the window on load, as well as any time you attempt to use a Win+{Direction} combo on the Spotify window.
if WinExist("Spotify") or WinExist("ahk_class SpotifyMainWindow")
{
WinGet, Style, Style
WinSet, Transparent, OFF
WinSet, Style, % Style | 0x40000 | 0x400000 | 0x800000 | 0xc00000
}
#Up::
FixSpotify()
Send #{Up}
return
#Down::
FixSpotify()
Send #{Down}
return
#Left::
FixSpotify()
Send #{Left}
return
#Right::
FixSpotify()
Send #{Right}
return
FixSpotify() {
WinGetTitle, Title, A
if (Title = "Spotify") {
WinGet, active_id, ID, A
WinGet, Style, Style, A
WinSet, Transparent, OFF, ahk_id %active_id%
WinSet, Style, % Style | 0x40000 | 0x400000 | 0x800000 | 0xc00000, ahk_id %active_id%
}
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment