I have a settingsfile that I read in with fileopen(filename, "r"). Then I split the lines up with StringSplit.
After that I go through each line that looks as follows:
Code: Select all
FirstSetting=1
Following up on that I send Part1 and Part2 to an associative array called "settings".
(I left all the loops out, no need for that in this example code)
Code: Select all
StringSplit, Part, Line%A_Index%, =
settings[Part1]:=Part2
The problem occurs with handling the values of the settings array!
Say I want to do the following:
Code: Select all
a:=settings["FirstSetting"]
b:= a + 1
msgbox % b
Instead this gives me an empty messagebox, because apparently in this case 'a' is a string and not an integer (or any number for that matter).
I'm stuck and can't get my head around it currently. It has to be easy, hasn't it?!
Glad for your help lads!