This is just a small issue, and no big deal if it can't be changed, but I wanted to know why it leaves the first space empty in a listbox when I use this code, and how to change it if possible.
Code:
on *:dialog:mail:init:*:{
/timer -om 0 50 /.SIGNAL -n TIME -o 0 1 TIME
var %x = 1
while (%x <= $lines(address.txt)) {
did -a mail 24 $gettok($read(address.txt,%x),1,44) $gettok($read(address.txt,%x),2,44)
inc %x
}
}
It leaves the first one empty, because the $read command (as you have it) presumes that the first line of the text file is a number that equals the number of lines in the file.
Code:
on *:dialog:mail:init:*:{
/timer -om 0 50 /.SIGNAL -n TIME -o 0 1 TIME
var %x = 1
while (%x <= $lines(address.txt)) {
did -a mail 24 $gettok($read(address.txt,nt,%x),1-2,44)
inc %x
}
}
I figured it out...sort of. I had a few options set for the listbox in the dialog table. I wasn't sure what they did, so I took out sort and size. I now just have vsbar, which is all I need.
The size option forces the listbox to use the size you specified instead of it being resized to accomodate items and the sort option sorts items added to the list alphabetically.
Can you change the text in a listbox to make it bold or in color? As for the other problem. I must have hit return when using the text file. There was a blank line. Thanks.
Colors and text maniuplation such a bold underline and italics can not be done with plain mirc dialogs. However there are several dialog enhancement dll's that can pretty things up and offer other dialog controls that mirc doesn't. Look for DCX or MDX.
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Just to add to that before he decides to look too far into it, DCX (MDX doesn't support colouring at all) supports a single colour per line and if you choose to add a bold/underlined item the whole item is bold/underlined, you cannot use BURK codes in items. Also, you cannot use colours in DCX listboxes, you have to use the more complex listview control.