Excuse the late reply.
I don't think you understand what I want to achieve. I want to send
scheme with
SendInput to a window. Scheme contains not only keypresses like
{Tab} or
{Enter}, but it shall also contain the contents of other variables, which are pieces of text.
Code: Select all
; INI file
[general]
var1 = some
var2 = text
var3 = for
var4 = example
scheme1 = {Tab}var1{Enter}var4
scheme2 = {Up}{Left}var2{Right}var3var4
scheme3 = var3{Enter}var2{Enter}
Code: Select all
; AHK code
IniRead, temp_ini, % A_WorkingDir "\settings.ini", general
Loop, Parse, temp_ini, `r`n
value := StrSplit(A_LoopField, "="), var := value[1], %var% := value[2]
F1::
SendInput, %scheme1%
Return
So the way you suggested would require me to construct the scheme variables in the AHK code, which I do not want.
Edit:
So I could just do it like this, but I want the scheme vars in the INI file:
Code: Select all
; INI file
[general]
var1 = some
var2 = text
var3 = for
var4 = example
Code: Select all
; AHK code
IniRead, temp_ini, % A_WorkingDir "\settings.ini", general
Loop, Parse, temp_ini, `r`n
value := StrSplit(A_LoopField, "="), var := value[1], %var% := value[2]
F1::
scheme1 := "{Tab}" var1 "{Enter}" var4
scheme2 := "{Up}{Left}" var2 "{Right}" var3 var4
scheme3 := var3 "{Enter}" var2 "{Enter}"
SendInput, %scheme1%
Return