0
votes

I simply just need this to work:

:?*C1:%variable%::hello!

The %variable% is a variable from a database.

I read about a regex library but I couldn't find any examples with this in it, so I am not sure it serves the purpose I need.

The idea behind this is that I am able to change the shortcut for that specific hotstring. Is this possible in any way? Thanks!

1

1 Answers

0
votes

2 options. Either you try creating a script dynamically or you try to match it with regex.

Dynamic Hotstrings

Get the library here: http://ahkscript.org/boards/viewtopic.php?t=3329

A nice example was also provided:

#Include Hotstring.ahk
 
Hotstring("i)((d|w)on)(t)", "$1'$3",3) 
;DONT -> DON'T
;dont -> don't
;dOnt -> dOn't
;WONT -> WON'T
;and so on.
 
Hotstring("i)colou?rs","$0 $0 everywhere!", 3) ; Regex, Case insensitive
; colors -> 'colors colors everywhere!'
; colours -> 'colours colours everywhere!'