mIRC Home    About    Download    Register    News    Help

Print Thread
echoing lines of a large file #166257 08/12/06 11:31 AM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
Hello
I have a file with 306706 lines in it. when i use a while to loop through all the lines and echo them into a window mIRC will crash after say 400 lines. Any ideas on why this is happening or any workarounds would be appreciated.
Thanks


Newbie
Re: echoing lines of a large file [Re: HaleyJ] #166266 08/12/06 12:45 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Well I don't know why it would crash after 400 lines but you'll never get 306706 lines into a window anyway, there's a limit on the number of lines a window can hold in it's buffer (display at once).

As a note, if you're putting the entire file into the window you can use loadbuf or filter and it'll be thousands of times faster than looping with $read(), however that still won't overcome the window buffer limit I mentioned. There's no way to get around that as far as I'm aware.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: echoing lines of a large file [Re: starbucks_mafia] #166294 08/12/06 10:15 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
/play is also much better for echoing all the lines of a text file to a window.


Invision Support
#Invision on irc.irchighway.net
Re: echoing lines of a large file [Re: Riamus2] #166299 08/12/06 10:45 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
How do you figure that?


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: echoing lines of a large file [Re: starbucks_mafia] #166300 08/12/06 10:51 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
i think he meant, in addition to your suggestions, much better than a while loop...
btk

Last edited by billythekid; 08/12/06 10:52 PM.

billythekid
Re: echoing lines of a large file [Re: billythekid] #166301 08/12/06 10:56 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Ah, I see.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: echoing lines of a large file [Re: starbucks_mafia] #166304 08/12/06 11:22 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Yeah, sorry. I said "also," but I should have made sure that I was replying to the right person.


Invision Support
#Invision on irc.irchighway.net
Re: echoing lines of a large file [Re: Riamus2] #166385 10/12/06 04:34 AM
Joined: Jun 2004
Posts: 19
Q
Qb_Master Offline
Pikka bird
Offline
Pikka bird
Q
Joined: Jun 2004
Posts: 19
I have the same issue when I'm working with downloaded HTTP data. Long lines of text are hard to break up using a while loop, especially if you're analyzing the file for html tags b/c if you break them up at the wrong point some tags may be still left in there.

P.S: If you think that's hard, try working with POSTdata files - in order to tell where each file in that list started I actually had to have it read a set amount, then read that minus 25 in position, then minus 50, then minus 75 before going on to read the next section of data lol. Now that was some crazy stuff! (Analyzing lengths of binary for certain values is not quite easy)

Re: echoing lines of a large file [Re: Qb_Master] #166390 10/12/06 05:46 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
It would definitely be nice to have commands and regular variables expanded to accept longer lines of text.


Invision Support
#Invision on irc.irchighway.net