mIRC Homepage
Posted By: rimini A socket script question - 07/01/03 04:12 AM
I have a very simple socket script that reads a page from a http server and echoes the results in a window. In fact its the sample script mentioned in mIRC help file. I have a problem though. Some lines in the page are quit big! The script fills a variable (%temp) and then echoes that variable. What I get is the "line too long" error!
I know variables have a limit for the information they can hold. I assume that the "line too long" error is from that limit but is there a way to get over it? Maybe not using a variable but something (?) else?
I have searched the board here but found nothing on my topic...
Thank you in advance
Posted By: GrimZ Re: A socket script question - 07/01/03 10:48 AM
What I do is use $mid to grab the first 930 chars, ie:

on 1:sockread:blah: {
var %tmp
sockread %tmp
%tmp = $mid(%tmp,1,930)
tokenize 32 %tmp

if ($$1-) echo -a $ifmatch
}
Posted By: rimini Re: A socket script question - 10/01/03 04:38 PM
Thank you! That worked fine!! grin
© mIRC Discussion Forums