Playing around with INI Read (because it would be a pain if I really had to leave all this information hardcoded)
I loop through an array, and try to read the file. The problem is, I don't have any information stored when I create a dump file.
I currently have something like this setup...
Code: Select all
Array["Set1"]:=[] ; Emtpy sub-array
if (FileExist("resource/config.ini")) {
; The following has no problems:
IniRead, set1, resource/config.ini, DATA SET 1, all, false
Loop, Parse, prefixes, |
{
Array["Set1"][A_Index]:=A_LoopField
}
; The following does not appear to store information...
for index in Array["Set1"]
{
; GET INFORMATION FROM CONFIG.INI FOR EACH PREFIX
prefix:=Array["Set1"][index]
IniRead, name, SET 1 NAME, %prefix%, false
Array["name"][prefix]:=name
}
}
DumpFile:="dump\DEBUG_DUMP.txt"
if (FileExist(DumpFile)) {
FileDelete, %DumpFile%
}
AppendString:="DEBUG DUMP"
for index in Array["Set1"] {
prefix:=Array["Set1"][index]
AppendString.="`r`nPREFIX: " . prefix
AppendString.="`r`nNAME(" . prefix . ")`t`t=`t" . Array["name"][prefix]
AppendString.="`r`n"
}
FileAppend, %AppendString%, %DumpFile%
MsgBox, Created dump file: %DumpFile%
Code: Select all
[DATA SET 1]
all=PRE1|PRE2|PRE3|PRE4
[SET 1 NAME]
PRE1=PREFIX 1
PRE2=PREFIX 2
PRE3=PREFIX 3
PRE4=PREFIX 4