mIRC Home    About    Download    Register    News    Help

Topic Options
#137683 - 17/12/05 02:44 PM Sorting numbers in combo dialog
bog__ Offline
Ameglian cow

Registered: 02/12/04
Posts: 40
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?

Top
#137684 - 17/12/05 02:58 PM Re: Sorting numbers in combo dialog
Aenei Offline
Ameglian cow

Registered: 17/11/05
Posts: 42
Loc: England
could you put your numbers in
0001
0010
0022
0123
etc?

Top
#137685 - 17/12/05 03:05 PM Re: Sorting numbers in combo dialog
bog__ Offline
Ameglian cow

Registered: 02/12/04
Posts: 40
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

Top
#137686 - 17/12/05 03:21 PM Re: Sorting numbers in combo dialog
bog__ Offline
Ameglian cow

Registered: 02/12/04
Posts: 40
Its working. Thanks on the idea Aenei
laugh

Top
#137687 - 17/12/05 03:29 PM Re: Sorting numbers in combo dialog
FiberOPtics Offline
Hoopy frood

Registered: 05/02/04
Posts: 2019
Loc: Leuven, Belgium
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.
_________________________
Gone.

Top