I’m stuck trying to figure out how to expand any variables in an AutoHotkey string. In my specific case, I read a line from a file and run it. The line may contain one or more variable references which need to be expanded before being passed to Run
.
Here’s a couple of tests (that don’t work):
Foo:="%A_MyDocuments%\blah.txt"
Bar=%Foo%
MsgBox %Bar%
a=1
b:="%a%+1=2"
MsgBox % b
I spent the past two hours scouring the docs and the Internet and found nothing that worked. There were a couple of close-calls, but nothing that matches this scenario.