From 979e6c3f9d7ed2bae40e8416c877f2c0aec41445 Mon Sep 17 00:00:00 2001 From: guest3456 Date: Fri, 5 Jan 2018 11:26:02 -0500 Subject: [PATCH] fix bug where case-sensitive hotstring wasnt clearing reported in Issue #5 this example previously woulnd't clear: Hotstring("ahk", "autohotkey", 2) --- Hotstring.ahk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Hotstring.ahk b/Hotstring.ahk index e2c64ea..74483da 100644 --- a/Hotstring.ahk +++ b/Hotstring.ahk @@ -119,7 +119,7 @@ Hotstring(trigger, label, mode := 1, clearTrigger := 1, cond := ""){ } if (v.clearTrigger){ ;Delete the trigger - SendInput % "{BS " . StrLen(local$.Value(0)) . "}" + SendInput % "{BS " . (v.mode==2 ? StrLen(local$) : StrLen(local$.Value(0))) . "}" } if (IsLabel(v.label)){ $ := v.mode == 3 ? local$ : local$.Value(0) @@ -164,4 +164,4 @@ Hotstring(trigger, label, mode := 1, clearTrigger := 1, cond := ""){ ; This label is triggered every time a key is pressed. Hotstring("", "", "CALLBACK") return -} \ No newline at end of file +}