NetTalk Central
The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: Alberto on July 22, 2011, 07:17:50 AM
-
I{m reading pages in text only mode and need to stop reading when some word is red.
I´m codign this in Proces ember
if FinishIfRead <> '' and instring(clip(FinishIfRead),PageString,1,1)<>0
self.close
END
PageString is empty till it finished reading.
What poperty must I use instead?
Thanks
-
Hi Alberto,
Do you mean the NetWebClient class?
That's different to NetClient, but seems to make more sense.
yes?
cheers
Bruce
-
Yes Bruce, NetWebClient.
Problem is when I use that code the app stops reading until a random number of process runs.
Is the code ok?
I´m coding this in Process embed:
if loc:FinishIfRead <> '' and instring(clip(loc:FinishIfRead),self.Page,1,1)<>0
self.close
END
-
Hi Alberto,
When you do a "Fetch" or "Post" the result ends up in the .PageReceived method.
If the page is very large, and arrives as multiple packets, then the .Process method is called for each incoming packet.
So it sounds to me like you want to intercept it in .Process rather than .PageReceived.
The incoming data is in self.packet.bindata
Be aware though that the packet could be split "inside" the text you are looking for.
cheers
Bruce
-
Ok, I´m usiong the .Proceess to check the incomming data.
It is ok to use self.close to end up the reading from the .Processs method?
Thanks
-
yes.