mIRC Home    About    Download    Register    News    Help

Topic Options
#89298 - 05/07/04 03:41 PM $read switches not working in v6.15?
Cyclone Offline
Babel fish

Registered: 06/02/04
Posts: 54
Loc: Cleveland, UK
//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.

Top
#89299 - 05/07/04 03:52 PM Re: $read switches not working in v6.15?
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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

Top
#89300 - 05/07/04 03:55 PM Re: $read switches not working in v6.15?
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.

Top
#89301 - 05/07/04 04:16 PM Re: $read switches not working in v6.15?
Cyclone Offline
Babel fish

Registered: 06/02/04
Posts: 54
Loc: Cleveland, UK
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.

grin

Top
#89302 - 05/07/04 04:17 PM Re: $read switches not working in v6.15?
Cyclone Offline
Babel fish

Registered: 06/02/04
Posts: 54
Loc: Cleveland, UK
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 smile

Top
#89303 - 05/07/04 04:32 PM Re: $read switches not working in v6.15?
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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

Top
#89304 - 05/07/04 04:42 PM Re: $read switches not working in v6.15?
Cyclone Offline
Babel fish

Registered: 06/02/04
Posts: 54
Loc: Cleveland, UK
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 LgrinL

Top