Using sockets

Mark Wieder mwieder at ahsoftware.net
Mon Mar 14 17:19:05 EST 2005


Kevin-

Monday, March 14, 2005, 12:01:47 PM, you wrote:

KJ> Well I have taken a break from working on my text editor. So I decided
KJ> to play around with the socket functions. I was trying to open a
KJ> socket to a text game so that I could read the login page I can get it
KJ> in to the text field and the page will show up in the field but it
KJ> will have a little square box at the left hand side of the field on
KJ> every line. How would I get rid of that? This is what I did to connect
KJ> to the socket

KJ> on mouseUp
KJ>   open socket "theseahaven.com:5500"
KJ>   read from socket "theseahaven.com:5500" for -1
KJ>   put it into tvar
KJ>   put tvar into field"field1"
KJ> end mouseUp

You're seeing crlf conversion problems. Runrev uses linefeeds as line
delimiters and you're probably seeing crlf pairs coming over the line.
You might try the replace command on the incoming stream to

replace crlf with lf in tvar

-- 
-Mark Wieder
 mwieder at ahsoftware.net



More information about the use-livecode mailing list