forked from rajlego/supermemo-ahk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OneHandedSM.ahk
161 lines (87 loc) · 4.03 KB
/
OneHandedSM.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
; Easy use of SuperMemo with only one hand (reps / grading / priorities / cloze / extract / back and forward)
; Backtick Button (beneath Esc) = Enter
; Tab + q/w/e/r sets priorities
; Tab + a = extract
; Tab + z = cloze
; Tab + d = back
; Tab + f = forward
;Note: Priority settings are currently based on my personal settings, not Naess's. Feel free to change it / change and reupload.
;by TheTrueSquidward, based off Naess's Numpad Prioritiy Script and raj's ideas.
#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 force
;———————————————————————————————————————————————————————————————Backtick button as enter ———————————————————————————————————————————————————————————————
#ifwinactive ahk_exe sm18.exe
sc029::Enter ;sc029 = backtick's scan code
;no matter where the cursor is it will go to learnbar then press Enter
sc029::
ControlGetFocus, foc, ahk_class TElWind
if (foc = "Internet Explorer_Server1") or (foc = "Internet Explorer_Server2")
{
Send, {esc}
}
send, {enter}
return
;——————————————————————————————————————————————————————————————— Priorities (Tab + q/w/e/r) —————————————————————————————————————————————————————————————————————————————
;Priorities are my own, feel free to change.
;scF = the scan code for Tab key
;Tab + q = high priority
scF & sc10::
{
send, !p
Random, OutputVar, 33, 37 ;Change if you want!
send, %OutputVar%
send, {enter}
}
return
;Tab + w = medium high priority
scF & sc11::
{
send, !p
Random, OutputVar, 50, 55 ;Change if you want!
send, %OutputVar%
send, {enter}
}
return
;Tab + e = medium low priority
scF & sc12::
{
send, !p
Random, OutputVar, 60, 70 ;Change if you want!
send, %OutputVar%
send, {enter}
}
return
;Tab + r = low priority
scF & sc13::
{
send, !p
Random, OutputVar, 85, 95 ;Change if you want!
send, %OutputVar%
send, {enter}
}
return
;——————————————————————————————————————————————————————————————— Extract / Clozes / Movement———————————————————————————————————————————————————————————————
#ifwinactive ahk_exe sm18.exe
scF & sc1E:: Send, !{x} ; Tab + a = extract
scF & sc1F:: Send, !{z} ; Tab + s = cloze
scF & sc20:: Send, !{Left} ; Tab + d = back
scF & sc21:: Send, !{Right} ; Tab + f = forward
sc1E::a
sc1F::s
sc20::d
sc21::f
;——————————————————————————————————————————————————————————————— Give keys normal function ———————————————————————————————————————————————————————————————
+sc029:: ;use shift+backtick if you still need to type a backtick while in SuperMemo
send, ``
return
;Alt Tab Window Switcher
!scF::
send, !{Tab}
return
;Win Tab Window Switcher
#scF::
send, #{Tab}
return