I'm trying to read lines from a file and have them be recognized as a variable I have defined in the script, right now they are being read as plain text ignoring the variables I have defined above.
Probably pretty simple right? thanks for the help.
Code: Select all
Run = Run, Firefox.exe ; <---------------------- Variable
Loop, read,C:\Program Files\AutoHotkey\new1.txt ; <------- firstline in file is %run%
{
count = 1,2,3,4
Ind1 := A_index
Loop, parse, A_LoopReadLine, `n
{
If Ind1 in %count%
{
word_array := StrSplit(A_loopfield,"`n", "")
run = run123 ; <--------------------------- Variable
MsgBox % word_array[a_index] ; <------ reads as plain text from file not as variables above.
}
else
{
run = %A_loopreadline% ; <------- Variable
Msgbox hi2 %Ind1% %run% ; <------ reads as plain text from file not as variables above.
}
}
}
return