im working on a script to check how many times a wildcard (specified in a trigger) appears in a rather large .txt file full of quotes.

eg: .qammount mirc
would return somthing like: "mirc" found in 13/417 quotes.

i thought i had it, but i'm stumped

what i'm trying to do, is make the script read every line by looping a string like this
Code:
 $read(C:\bot\bot_log_pub.txt, %currentline)
%currentline would be set to $calc($readn + 1) to check the next line

to stop the loop i would just use an if statement (if %currentline == %totalquotes) where %totalquotes would read "line 0" in the .txt file, line 0, if you didnt know, is a number that represents the total number of lines in the .txt file

basicly all i need to know, is how to scan only 1 line at a time, instead of the whole document.
thanks in advance - dak

ps: if you have a different way of completing my objective, feel free to post it, any help will be appriciated

Last edited by dak; 11/03/03 05:30 AM.

______________________________

123go