-
Notifications
You must be signed in to change notification settings - Fork 0
/
DevRefresh.ahk
46 lines (40 loc) · 1.24 KB
/
DevRefresh.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#NoEnv
#SingleInstance, Force
GroupAdd, AnyBrowser, ahk_class Chrome_WidgetWin_1
GroupAdd, AnyBrowser, ahk_class MozillaWindowClass
GroupAdd, AnyBrowser, ahk_class IEFrame
GroupAdd, DevEditor, ahk_exe Brackets.exe
GroupAdd, DevEditor, ahk_exe WebStorm.exe
GroupAdd, DevEditor, ahk_exe PhpStorm.exe
GroupAdd, DevEditor, ahk_exe sublime_text.exe
GroupAdd, DevEditor, ahk_exe atom.exe
#IfWinActive, ahk_group DevEditor
Capslock & Space::
Send, ^s
;Sleep 10
AutoRefreshWeb:
autoRefreshDestinations =
(ltrim comments
; A list of browser titles that should be refreshed, in this order
Document
localhost
127.0.0.1
index.html
ahk_group AnyBrowser ; No specific window has been found, so just refresh any browser window
)
; Determine which window to send Refresh:
SetTitleMatchMode RegEx
Loop, parse, autoRefreshDestinations, `n
{
IfWinExist %A_LoopField%
{
;WinActivate
ControlFocus
;Sleep 300
ControlSend, , ^a^{F5}
;SendInput ^a^{F5}
Return
}
}
Return
#IfWinActive ;EndRegion