mIRC Home    About    Download    Register    News    Help

Print Thread
#205882 02/11/08 07:22 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I did a search on this forum and didn't find a answer, i use

$gettok($did(6,$did(6).sel).text,1,41)

to grab a line from a listbox in a dialog, but how can i get all the lines in that listbox? i can only get the first line from it, and i need the rest too. tested to change the value 1,41 and still no go, someone that can explain this a bit to me?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #205884 02/11/08 07:36 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
$did(6,$did(6).sel).text

Returns the text from the selected line in item #6. If you want to return other lines, use something like this:

$did(6,17).text <- returns line 17

If you have a multisel listbox, use something like this:

$did(6,$did(6,8).sel).text <- returns the 8th selected line

-genius_at_work

sparta #205886 02/11/08 07:38 PM
Joined: Jul 2006
Posts: 4,172
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,172
You can't use $gettok here since there are more than one line, you need to use another method.I can't test this but with /savebuf and binary command, you can extract the first token separated by a $chr(41) easily


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
or you could use $did(6).seltext

Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
$did(6,1).text with a while loop did the trick, thanx. smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard