Function FindNumber
Exch $0
Push $1
Push $2
StrCpy $1 "0"
loop:
IntOp $1 $1 + 1
StrCpy $2 $0 1 $1
StrCmp $2 "=" 0 loop
StrCpy $0 $0 $1
Pop $2
Pop $1
Exch $0
FunctionEnd
Section -config
StrCpy $R9 "0"
fileopen $0 "servers.ini" "r"
Loop:
fileread $0 $1
StrCmp $1 "" ExitLoop
StrCpy $2 $1 1
StrCmp $2 "n" 0 Loop
StrCpy $2 $1 "" 1
Push $2
Call FindNumber
Pop $2
IntCmp $2 $R9 Loop Loop
StrCpy $R9 $2
Goto Loop
ExitLoop:
FileClose $0
MessageBox MB_OK "The highest entry is $R8" i'd love to use this script on the mirc.ini, which in difference to the servers.ini has various sections. the layout of mirc.ini looks like this:[section]
n0=entry 0
n1=entry 1
n2=entry 2
[another section]
n0=entry 0
n1=entry 1
n2=entry 2
etc.
i could need a helping hand on how to modify the script above to do the following.
i need to script to do the same in a specified section, let's say determine the highest value (nX) in a section [example].