|
$read switches not working in v6.15?
#89298
05/07/04 02:41 PM
|
Joined: Feb 2004
Posts: 54
Cyclone
OP
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.
|
|
|
Re: $read switches not working in v6.15?
#89299
05/07/04 02:52 PM
|
Joined: Jun 2003
Posts: 5,024
Mentality
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
|
|
|
Re: $read switches not working in v6.15?
#89300
05/07/04 02:55 PM
|
Joined: Dec 2002
Posts: 2,962
starbucks_mafia
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.
|
|
|
Re: $read switches not working in v6.15?
#89301
05/07/04 03:16 PM
|
Joined: Feb 2004
Posts: 54
Cyclone
OP
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.
|
|
|
Re: $read switches not working in v6.15?
#89302
05/07/04 03:17 PM
|
Joined: Feb 2004
Posts: 54
Cyclone
OP
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
|
|
|
Re: $read switches not working in v6.15?
#89303
05/07/04 03:32 PM
|
Joined: Jun 2003
Posts: 5,024
Mentality
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
|
|
|
Re: $read switches not working in v6.15?
#89304
05/07/04 03:42 PM
|
Joined: Feb 2004
Posts: 54
Cyclone
OP
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
|
|
|
|
|
|