-
Notifications
You must be signed in to change notification settings - Fork 14
/
ClickFix-Logger.ahk
96 lines (72 loc) · 1.75 KB
/
ClickFix-Logger.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
; --- Load directives ---
#SingleInstance, force
#InstallMouseHook
SendMode, Input
SetWorkingDir %A_ScriptDir%
; --- Actual Script ---
;
; Description:
; This is a debugging + optimizing script that is solely for logging what clicks occur and when.
; For security reasons, the clicks are not logged to a file - they are stored in memory.
Menu, Tray, NoStandard
Menu, Tray, Add, Restart, restart
Menu, Tray, Add, Clear Log, clearscreen
Menu, Tray, Add,
Menu, Tray, Add, Exit, exit
Menu, Tray, Tip, ClickFix Click Logger - Understand your mouse
loggerGui() {
global
; Initialization
Gui, Logger: New
Gui, Logger: -Resize -MaximizeBox +OwnDialogs +AlwaysOnTop
; Title and Copyright
Gui, Logger:font, s16, Arial
Gui, Logger:Add, Text, W500, Click Log:
Gui, Logger:font, s8, Arial
Gui, Logger:Add, Button, xp+330 w60 h20 gclearscreen, Clear
Gui, Logger:font, s8, Consolas
Gui, Logger:Add, Edit, Readonly x20 yp+30 w390 h540 vlog_view, Click Somewhere!
Gui, show, W430 H600 center, ClickFix Click Logger
}
loggerGui()
clearscreen() {
global
screen := ""
Gui, Logger:Submit, NoHide
GuiControl, Logger:, log_view, % screen
}
addLine(click) {
global
FormatTime, time, , hh:mm:ss tt (dd/MM/yyyy)
screen := screen . "Detected a " . click . " click at " . time . "`n"
Gui, Logger:Submit, NoHide
GuiControl, Logger:, log_view, % screen
}
restart() {
Reload
ExitApp
}
LoggerGuiClose() {
ExitApp
}
exit() {
ExitApp
}
~LButton up::
addLine("left ( up )")
return
~LButton::
addLine("left (down)")
return
~RButton up::
addLine("right ( up )")
return
~RButton::
addLine("right (down)")
return
~MButton up::
addLine("middle ( up )")
return
~MButton::
addLine("middle (down)")
return