mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello,

I am not quite sure on how to get a while loop to sort its output to a dialog list.

Code:
  var %t = tablename, %i = 1
    while ($hget(%t, %i).item != $null) {
      did -a $dname 1 $v1
      inc %i 
    }


Thanks in advance

Cheers,

Jay

Joined: Jul 2004
Posts: 59
L
Babel fish
Offline
Babel fish
L
Joined: Jul 2004
Posts: 59
have you tried the Sort Property, Since I dont know what your using Here is the Help file

list id, x y w h, style (sort, extsel, multsel, size, vsbar, hsbar, check, radio)

combo id, x y w h, style (sort, edit, drop, size, vsbar, hsbar)


I have a file I read text to and it works correctly

dialog CIRCC_AJ {
title "Auto Join"
size -1 -1 164 153
icon $icons(rgcicon.ico), 0
option dbu
button "Add", 1, 118 19 37 12
combo 4, 3 20 107 111, size edit sort
......

alias -l circc_aj.fill {
var %circc_aj.total = $lines($mircdirSettings\CIRCC_AJ.txt)
var %circc_aj.number = 1
while (%circc_aj.number <= %circc_aj.total) {
did -a CIRCC_AJ 4 $read($mircdirSettings\CIRCC_AJ.txt,%circc_aj.number)
inc %circc_aj.number 1
}

Hope this helps.


Last edited by LittleJohn; 07/11/08 03:49 PM.
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Thanks very much,

I added the sort on the edit box line and suddenly everything was nicely sorted.

Thanks very much.

Cheers,

Jay

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Thats ncie for dialogs. Without dialogs I believe you use /filter. Just some added info for you!

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If it's a fairly small list, it could be stored in a variable using $addtok, then sorted using $sorttok



Link Copied to Clipboard