reading from MQ2HUD.ini in a macro...
Posted: Mon Aug 23, 2004 1:47 pm
i'm trying to write a macro that reads from the MQ2HUD.ini file so i can make quick easy changes to whole parts of it at once. for example, moving the group window part of it all at once... without having to manually change every x,y loc.
i ran into a problem though when i read from the ini file, it will parse all of the MQData variables in the ini when i read it. i tried using /noparse, but it doesn't do what im looking for. here's a little bit of the code i have:
if the line in the ini file is:
and i have a target at say 100% hp, it will echo
i guess i could read the key one character at a time, and work with it from there, but wondering if there's some other way i'm missing
i ran into a problem though when i read from the ini file, it will parse all of the MQData variables in the ini when i read it. i tried using /noparse, but it doesn't do what im looking for. here's a little bit of the code i have:
Code: Select all
Sub Main
/declare iniName string outer mqpath\MQ2HUD.ini
/declare key string outer HUDName
/declare valueList string outer ${Ini[${iniName},${key}]}
/declare value string local
/declare line string local
/declare x int local
/declare y int local
/declare i int local
/declare j int local
/declare n int local
/varcalc n ${valueList.Count[|]}-1
/for i 1 to ${n}
/varset value ${valueList.Arg[${i},|]}
/varset line ${Ini[${iniName},${key},${value}]}
/echo ${line}
| /ini "${iniName}" ${key} ${value} "${line}"
/next iif the line in the ini file is:
Code: Select all
TargetHpPct= 3,702,668,255,255,255,${If[${Target.PctHPs}<=100,${Target.PctHPs},]}Code: Select all
3,702,668,255,255,255,100