forked from andreashofmann/AutofocusAHK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAutofocusAHK-triggers.ahk
74 lines (63 loc) · 1.35 KB
/
AutofocusAHK-triggers.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
; AutofocusAHK
;
; Triggers for actions, which will be connected with user defined hotkeys
;
; @author Andreas Hofmann
; @license See LICENSE.txt
; @version 0.9.5.4
; @since 0.9
; Trigger for adding a new task
TriggerAddTask:
If (WinActive("Add Task - " . ApplicationName))
{
; If "Add Task" window is active, close it
WinClose
}
Else
{
; Show "Add Task" window
ShowAddTaskWindow()
}
Return
; Trigger for showing the next tasks
TriggerShowNextTasks:
; Show "Show Tasks" window
ShowNextTasks()
Return
; Trigger to start/stop working
TriggerWork:
If (WinActive("Reverse Mode - " . ApplicationName) or WinActive("Forward Mode - " . ApplicationName) or WinActive("Done - " . ApplicationName) or WinActive("Forward Mode - " . ApplicationName) or WinActive("Review Mode - " . ApplicationName))
{
; If work window is active, close it
WinClose
}
Else
{
; Show work window
Work()
}
Return
TriggerPreferences:
; Show autostart selection
ShowPreferences()
Return
TriggerExport:
Export()
Return
TriggerQuit:
MsgBox, 4, %ApplicationName% %Ver%, Do you want to exit %ApplicationName%?
IfMsgBox Yes
{
ExitApp
}
Return
TriggerReload:
MsgBox, 4, %ApplicationName% %Ver%, Do you want to reload %ApplicationName%?
IfMsgBox Yes
{
Reload
}
Return
TriggerSearch:
ShowSearchWindow()
Return