Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

[Help] Change output order by using ini file

$
0
0
Hi, I don't know what should be the proper title for this question

I'm trying to create a way to change the output order by using a .ini file, the problem is using the correct "row" from the array and passing it as a variable, don't know how to explain it properly so here's what I done so far, and is not working:

[ autoit ]      
Global $ini = @ScriptDir & "\test.ini", $x IniWrite($ini,"Test","CustomView","#name# (#yold#) - #contry#") Dim $aListMembers[5][3] = [['19','Tiago','Brazil'], _                             ['34','GUILERMO','Spain'], _                             ['25','NICOLAO','Spain'], _                             ['20','ELENA','Italy'], _                             ['18','KRISTEN','Germany']] $sConfig = IniRead($ini,"Test","CustomView","#contry# - #name# (#yold#)") FileDelete($ini) $list = StringReplace($sConfig,"#contry#",$aListMembers[$x][2]) $list = StringReplace($sConfig,"#name#",$aListMembers[$x][1]) $list = StringReplace($sConfig,"#yold#",$aListMembers[$x][0]) For $x = 0 To UBound($aListMembers)-1     ConsoleWrite($list&@LF) Next Exit

the array is not being read correctly, the output (from the code above) is:
#name# (19) - #contry#
#name# (19) - #contry#
#name# (19) - #contry#
#name# (19) - #contry#
#name# (19) - #contry#

the expected output is:
Tiago (19) - Brazil
GUILERMO (34) - Spain
NICOLAO (25) - Spain
ELENA (20) - Italy
KRISTEN (18) - Germany

This even possible to do? :(

thanks

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>