-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenter.ahk
39 lines (32 loc) · 848 Bytes
/
enter.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
#NoEnv
#SingleInstance Force
SendMode Input
global ExcludedApps := [] ; array to hold app names
configFile := A_ScriptDir "\config.ini"
IniRead, appList, %configFile%, Exclusions, Apps,
if (appList != "")
{
ExcludedApps := StrSplit(appList, ",")
for index, app in ExcludedApps
ExcludedApps[index] := Trim(app)
}
; Function: returns true if the active window’s process name is in the exclusion list.
IsExcluded() {
global ExcludedApps
WinGet, processName, ProcessName, A
for index, app in ExcludedApps {
if (processName = app)
return true
}
return false
}
#If !IsExcluded()
; SHIFT+ENTER: insert a new line BELOW current line.
+Enter::
Send, {End}{Enter}
Return
; CTRL+ALT+ENTER: insert a new line ABOVE current line.
^!Enter::
Send, {Home}{Enter}{Up}
Return
#If