Added timer to reset the hook every 5 min

This commit is contained in:
PhatDave
2021-10-28 18:31:05 +02:00
parent 8551c0c5b0
commit 7604b22ad8
2 changed files with 44 additions and 0 deletions

View File

@@ -24,6 +24,8 @@ enabledWindows.Push(Array())
global keyLog := Array() global keyLog := Array()
global whitelistKeys := Array() global whitelistKeys := Array()
SetTimer, ResetHook, -60000
; whitelistKeys["q"] := 1 ; whitelistKeys["q"] := 1
; whitelistKeys["e"] := 1 ; whitelistKeys["e"] := 1
; whitelistKeys[1] := 1 ; whitelistKeys[1] := 1
@@ -277,6 +279,17 @@ RemoveCurrentWindow() {
} }
} }
ResetHook:
ih := InputHook("B")
ih.KeyOpt("{All}", "NV")
ih.OnKeyDown := Func("OnKeyDown")
ih.OnKeyUp := Func("OnKeyUp")
ih.Start()
; Tooltip, WIN
SetTimer, ResetHook, -30000
return
F5:: F5::
ih := InputHook("B") ih := InputHook("B")
ih.KeyOpt("{All}", "NV") ih.KeyOpt("{All}", "NV")

31
ssddddd Normal file
View File

@@ -0,0 +1,31 @@
diff --git a/Echo.ahk b/Echo.ahk
index fa4413e..d0a0292 100644
--- a/Echo.ahk
+++ b/Echo.ahk
@@ -24,6 +24,8 @@ enabledWindows.Push(Array())
global keyLog := Array()
global whitelistKeys := Array()

+SetTimer, ResetHook, -60000
+
; whitelistKeys["q"] := 1
; whitelistKeys["e"] := 1
; whitelistKeys[1] := 1
@@ -277,6 +279,17 @@ RemoveCurrentWindow() {
}
}

+ResetHook:
+ ih := InputHook("B")
+ ih.KeyOpt("{All}", "NV")
+ ih.OnKeyDown := Func("OnKeyDown")
+ ih.OnKeyUp := Func("OnKeyUp")
+ ih.Start()
+ ; Tooltip, WIN
+ SetTimer, ResetHook, -60000
+return
+
+
F5::
ih := InputHook("B")
ih.KeyOpt("{All}", "NV")