Skip to content

Instantly share code, notes, and snippets.

@tobbbe
Created October 9, 2013 13:54
Show Gist options
  • Save tobbbe/6901686 to your computer and use it in GitHub Desktop.
Save tobbbe/6901686 to your computer and use it in GitHub Desktop.
autohotkey reload page on save visual studio
$^s:: ; only capture actual keystrokes
SetTitleMatchMode, 2 ; match anywhere in the title
IfWinActive, Sublime Text 2 ; find Sublime Text
{
Send ^s ; send save command
IfWinExist, Mozilla Firefox ; find firefox
{
WinActivate ; use the window found above
Send ^r ; send browser refresh
WinActivate, Sublime Text 2 ; get back to Sublime Text
}
IfWinExist, Internet Explorer ; find IE
{
WinActivate ; use the window found above
Send ^r ; send browser refresh
WinActivate, Sublime Text 2 ; get back to Sublime Text
}
IfWinExist, Google Chrome ; find Chrome
{
WinActivate ; use the window found above
Send ^r ; send browser refresh
WinActivate, Sublime Text 2 ; get back to Sublime Text
}
}
else
{
IfWinActive, Visual Studio ; find Visual Studio
{
Send ^s ; send save command
IfWinExist, Mozilla Firefox ; find firefox
{
WinActivate ; use the window found above
Send ^r ; send browser refresh
WinActivate, Visual Studio ; get back to Sublime Text
}
IfWinExist, Internet Explorer ; find IE
{
WinActivate ; use the window found above
Send ^r ; send browser refresh
WinActivate, Visual Studio ; get back to Sublime Text
}
IfWinExist, Google Chrome ; find Chrome
{
WinActivate ; use the window found above
Send ^r ; send browser refresh
WinActivate, Visual Studio ; get back to Sublime Text
}
}
else
{
Send ^s ; send save command
}
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment