|
|
Joined: Feb 2004
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Feb 2004
Posts: 54 |
//echo -a $read(readme.txt,s,mIRC,1) = doesn't work //echo -a $read(readme.txt,w,mIRC,1) = doesn't work
I've wasted hours trying to track down the problem but I've since checked with a few friends and theirs doesn't work either.
|
|
|
|
Joined: Jun 2003
Posts: 5,024
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 5,024 |
As far as I know the 's' switch looks for a line starting with the specified word. Is there a line in readme.txt that starts with mIRC? The following works for me: //echo -a $read( versions.txt,s,mirc,1) (I inserted a line beginning with mIRC for testing purposes). //echo -a $read( versions.txt,w, *mIRC *,1) works fine for me too. Tested on 6.15\XP Home. Regards,
Mentality/Chris
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
There are spaces at the start of the lines in readme.txt, that is why the s switch isn't matching. Use //echo -a $read(readme.txt,s, $+($chr(32), mIRC),1) = doesn't work instead and you'll see it works.
The wildcard match isn't working because you have no wildcards and there's no line in readme.txt containing just 'mIRC'.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Feb 2004
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Feb 2004
Posts: 54 |
Thanks Chris... Top three lines of readme.txt which comes with mIRC: mIRC(R) v6.15 Internet Relay Chat Client Copyright (c) 1995-2004 mIRC Co. Ltd. All Rights Reserved.
|
|
|
|
Joined: Feb 2004
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Feb 2004
Posts: 54 |
spaces at the begining of lines is not important... because i found out about this error while reading another txt file that has no spaces in the lines at all. thanks for the info
|
|
|
|
Joined: Jun 2003
Posts: 5,024
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 5,024 |
Because the (R) mark is directly next to the abbreviation mIRC $read picks this up - therefore, it needs to be specified in the parameters:
//echo -a $read(readme.txt,s,mIRC(R),1) works fine for me.
..although I don't think the ,1 is mandatory.
Regards,
Mentality/Chris
|
|
|
|
Joined: Feb 2004
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Feb 2004
Posts: 54 |
thanks again m8... I think I have the grasp of it now. Testing and the hands-on approach is giving me some good experience. Damn this is confusing L L
|
|
|
|
|
|