-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathToggleAutoClicker.ahk
44 lines (38 loc) · 1.07 KB
/
ToggleAutoClicker.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
; Set the background color of your script
GuiColor := "EEFFFF" ; Replace with your desired background color in hexadecimal format
; Function to create a "transparent" MsgBox
TransparentMsgBox(Text) {
Gui Color, %GuiColor%
Gui Font, s10 ; Adjust font size as needed
Gui Add, Text,, %Text%
Gui Show, , MsgBox
Sleep 2000 ; Adjust the duration the MsgBox is visible (in milliseconds)
Gui Destroy
}
Toggle := false
+F1::
Toggle := !Toggle
if (Toggle) {
; Press and hold the left mouse button
TransparentMsgBox("Activated")
Send, {LButton down}
} else {
; Release the left mouse button
TransparentMsgBox("Deactivated")
Send, {LButton up}
}
return
toggle := false
F1::
toggle := !toggle
if (toggle) {
SetTimer, ClickLoop, 1 ; Adjust the interval (in milliseconds) as needed
TransparentMsgBox("Activated")
} else {
SetTimer, ClickLoop, Off
TransparentMsgBox("Deactivated")
}
return
ClickLoop:
MouseClick
return