mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 612
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
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)


billythekid
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$remove(text, $chr(9))


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
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

Last edited by Sigh; 15/09/04 01:51 PM.
Joined: Mar 2003
Posts: 612
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
thanks for your replies, works a treat wink


billythekid

Link Copied to Clipboard