mIRC Homepage
Posted By: sparta $gettok() - 02/11/08 07:22 PM
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?
Posted By: genius_at_work Re: $gettok() - 02/11/08 07:36 PM
$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
Posted By: Wims Re: $gettok() - 02/11/08 07:38 PM
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
Posted By: RusselB Re: $gettok() - 02/11/08 07:41 PM
or you could use $did(6).seltext
Posted By: sparta Re: $gettok() - 02/11/08 07:49 PM
$did(6,1).text with a while loop did the trick, thanx. smile
© mIRC Discussion Forums