-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.ahk
56 lines (50 loc) · 1.04 KB
/
script.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
; Only listen to hotkeys when the Anki add window is active. This incluences the rest of the script.
#HotIf WinActive("Add")
; Activate when F1 is pressed
F1::
{
; Send Ctrl+N to open card type menu
SendInput "^n"
; Wait until the "Choose Note Type" window is active
WinWaitActive "Choose Note Type"
; Send the name of the card type you want to select
SendInput "Basic (A){enter}"
; Return to stop the script from continuing
return
}
; Same for the following hotkeys
F2::
{
SendInput "^n"
WinWaitActive "Choose Note Type"
SendInput "Cloze (A){enter}"
return
}
F3::
{
SendInput "^n"
WinWaitActive "Choose Note Type"
SendInput "Basic (A reversed){enter}"
return
}
F4::
{
SendInput "^n"
WinWaitActive "Choose Note Type"
SendInput "Type Code{enter}"
return
}
F5::
{
SendInput "^n"
WinWaitActive "Choose Note Type"
SendInput "Code Output{enter}"
return
}
F6::
{
SendInput "^n"
WinWaitActive "Choose Note Type"
SendInput "Basic (Code){enter}"
return
}