From 7604b22ad8e9bbd1f2624fb66317a0426ec81729 Mon Sep 17 00:00:00 2001 From: PhatDave Date: Thu, 28 Oct 2021 18:31:05 +0200 Subject: [PATCH] Added timer to reset the hook every 5 min --- Echo.ahk | 13 +++++++++++++ ssddddd | 31 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ssddddd diff --git a/Echo.ahk b/Echo.ahk index fa4413e..2c9652e 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, -30000 +return + + F5:: ih := InputHook("B") ih.KeyOpt("{All}", "NV") diff --git a/ssddddd b/ssddddd new file mode 100644 index 0000000..77f5ff1 --- /dev/null +++ b/ssddddd @@ -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")