Skip to content

Instantly share code, notes, and snippets.

@DannyBen
Created July 19, 2015 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DannyBen/6cf142909c08b0349f1b to your computer and use it in GitHub Desktop.
Save DannyBen/6cf142909c08b0349f1b to your computer and use it in GitHub Desktop.
Refresh Chrome whenever it receives focus
; Chrome Refresh On Focus
; Refresh Chrome whenever it receives focus
#SingleInstance force
#Persistent
Gosub WaitForChrome
Return
WaitForChrome:
WinWaitActive ahk_class Chrome_WidgetWin_1
Send ^r
ToolTip Refreshing
SetTimer RemoveToolTip, 1000
Gosub WaitForChromeOut
Return
WaitForChromeOut:
WinWaitNotActive ahk_class Chrome_WidgetWin_1
Gosub WaitForChrome
Return
RemoveToolTip:
SetTimer RemoveToolTip, Off
ToolTip
return
; Alt+Escape to exit
!ESC::ExitApp
; For development, reload script on save
; ~^s::Reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment