Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

JnLlnd's backreference bugfix #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Hotstring.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ Hotstring(trigger, label, mode := 1, clearTrigger := 1, cond := ""){
toSend := v.label

;Working out the backreferences
Loop, % local$.Count()
StringReplace, toSend,toSend,% "$" . A_Index,% local$.Value(A_index),All
Loop, % local$.Count()+1
StringReplace, toSend,toSend,% "$" . A_Index-1,% local$.Value(A_index-1),All
toSend := RegExReplace(toSend,"([!#\+\^\{\}])","{$1}") ;Escape modifiers
SendInput,%toSend%
}
Expand Down Expand Up @@ -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
}
}