mIRC Home    About    Download    Register    News    Help

Print Thread
#209517 16/02/09 08:00 PM
Joined: Feb 2009
Posts: 6
B
booth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Feb 2009
Posts: 6
How can I make this read more than one line?


Code:
on *:TEXT:!next:#: msg # $read(next.txt)



Joined: Oct 2005
Posts: 827
P
Hoopy frood
Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
$read only reads once. do you want it to read more than once and msg more than once? if so, why not have the msg twice?

Last edited by pouncer; 16/02/09 08:07 PM.
Joined: Feb 2009
Posts: 6
B
booth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Feb 2009
Posts: 6
I have 2 lines, the first line is never overwritten only the second. I want to read and msg to # both lines in 1 message.

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
$read(file,1) return the first line of your file, $read(file,2) return the second line...


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Instead of reading one line, then messaging it, then reading the other line, then messaging it, use the /play command

See /help /play

This will be especially helpful if, in the future, you decide to increase the number of lines in the text file.

Joined: Feb 2009
Posts: 6
B
booth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Feb 2009
Posts: 6
Thanks.

Joined: Jun 2008
Posts: 58
P
Babel fish
Offline
Babel fish
P
Joined: Jun 2008
Posts: 58
I wonder why you actually want to read the first line if it doesn't ever change anyway...
You could simply /msg the text itself.


Link Copied to Clipboard