-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.ahk
90 lines (77 loc) · 2.42 KB
/
edit.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance Ignore ;;执行程序前先关闭程序
#Persistent
IsRemnoteOrBrowser() {
isRemnoteClient := WinActive("ahk_exe RemNote.exe")
isBrowser := WinActive("ahk_exe chrome.exe") or WinActive("ahk_exe msedge.exe") or WinActive("ahk_exe firefox.exe")
flag := isRemnoteClient or isBrowser
; MsgBox, %currentUrl% %isRemnoteClient%? %isBrowser% %isRemnoteUrl% %flag%
Return flag
}
#If, IsRemnoteOrBrowser()
:*:>>::
Send,{Text}`>`>
Input, ov, L1, {LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{CapsLock}{NumLock}{PrintScreen}{Pause}
If (ov = ">")
Send {Text}`>
Return
#If, IsRemnoteOrBrowser()
:T*:<<::<<
#If, IsRemnoteOrBrowser()
:*:::::
Send,{Text}`:`:
Input, ov, L1, {LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{CapsLock}{NumLock}{PrintScreen}{Pause}
If (ov = ":")
Send {Text}`:
Return
#If, IsRemnoteOrBrowser()
:*:;;::
Send,{Text};;
Input, ov, L1, {LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{CapsLock}{NumLock}{PrintScreen}{Pause}
If (ov = ";")
Send {Text};
Return
#If, IsRemnoteOrBrowser()
<+1::
if (A_PriorHotkey = "<+1")
{
; Too much time between presses, so this isn't a double-press.
Send,{Text}`!
return
}
Send,{Text}`!
return
#If, IsRemnoteOrBrowser()
<+3::
if (A_PriorHotkey = "<+3")
{
; Too much time between presses, so this isn't a double-press.
Send,{Text}`#
return
}
Send,{Text}`#
return
#If, IsRemnoteOrBrowser()
<+4::
if (A_PriorHotkey = "<+4")
{
; Too much time between presses, so this isn't a double-press.
Send,{Text}`$
Send, ^{space}
return
}
Send,{Text}`$
return
#If, IsRemnoteOrBrowser()
<+5::
if (A_PriorHotkey = "<+5")
{
; Too much time between presses, so this isn't a double-press.
Send,{Text}`%
return
}
Send,{Text}`%
return