mIRC Homepage
Posted By: billythekid ascii code for tab key perhaps? - 15/09/04 11:28 AM
does anyone know how i can write a line from a .txt file into a dialog list box stripped of any tabs that are on the line?
i have this code
Code:
 while %t < $lines(wptools\akicklist.txt) {
    inc %t
    did -a wplists 8 $strip($read(wptools\akicklist.txt,%t))
  }
  

if any of the lines in the file have a tab you get a box character in the listbox. Any ideas greatly appreciated ;o)
Posted By: starbucks_mafia Re: ascii code for tab key perhaps? - 15/09/04 01:01 PM
$remove(text, $chr(9))
Posted By: Sigh Re: ascii code for tab key perhaps? - 15/09/04 01:50 PM
You would need to remove $chr(9) from the string, can't be done with $strip which only removes control codes. Use the following alias along with the command, it's a faster alternative to looping with $read:

alias remtab { did -a wplists 8 $remove($1-,$chr(9)) }

Then use the command /filter -fk wptools\akicklist.txt remtab

Edit: sorry, had this post on preview for about an hour before I realized I hadn't yet posted
Posted By: billythekid Re: ascii code for tab key perhaps? - 22/09/04 08:06 AM
thanks for your replies, works a treat wink
© mIRC Discussion Forums