mIRC Homepage
Posted By: bog__ Sorting numbers in combo dialog - 17/12/05 02:44 PM
I have new problem

dialog rat {
title "echo"
size -1 -1 400 320
option dbu
combo 900, 260 60 110 120, tab 5 size drop sort vsbar %result multi
button "New Scan", 109, 140 260 110 30, flat
}
on *:DIALOG:rat:init:0 {
did -a $dname 900 5
did -a $dname 900 8
did -a $dname 900 10
did -a $dname 900 6
did -a $dname 900 5
did -a $dname 900 1
did -a $dname 900 453
did -a $dname 900 123
did -a $dname 900 22
did -a $dname 900 23222
did -a $dname 900 888
did -a $dname 900 3211
did -a $dname 900 144
did -a $dname 900 2321
did -a $dname 900 132
did -a $dname 900 45435
did -a $dname 900 223
did -a $dname 900 453
did -a $dname 900 3223
did -a $dname 900 35555
did -a $dname 900 88
}
and he is sorthing them like this

1
10
123
132
144
22
223
2321
23222
2311
3223
35555
453
......

But i realy need that data in combo to be sorted like this

1
10
22
123
132
144
223
453
2311
2321
3223
23222
35555
......
I whas serching mirc help and forum for the solution but i dident finde anything simular. Can someone help?
Posted By: Aenei Re: Sorting numbers in combo dialog - 17/12/05 02:58 PM
could you put your numbers in
0001
0010
0022
0123
etc?
Posted By: bog__ Re: Sorting numbers in combo dialog - 17/12/05 03:05 PM
hm good idea i can then try to use
$len(text)
and if $len(text) is 1 or beager i can add 0
write 2.txt did -a $chr(36) $+ dname 900 0000 $+ %3 %2
and then reload
/.load -rs 2.txt
/dialog -m rat rat
I will try it, hope it will work
Posted By: bog__ Re: Sorting numbers in combo dialog - 17/12/05 03:21 PM
Its working. Thanks on the idea Aenei
laugh
Posted By: FiberOPtics Re: Sorting numbers in combo dialog - 17/12/05 03:29 PM
Remove the sort option from the combo, and after adding the numbers issue this command:

//filter -ciout 1 32 rat 900 rat 900

Take a look at /didtok btw.
© mIRC Discussion Forums