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 +}