troy at rpsystems.net
Fri Aug 27 17:51:59 EDT 2004
On Aug 27, 2004, at 5:35 PM, Keith Hutchison wrote:
> Does the following code look correct?
> set TheResult to open socket "127.0.0.1:4563" with message
> set the contents of ResultField to TheResult
No. There is a lot wrong with it, to be blunt. ;-)
The first line would probably look like -
open socket to "127.0.0.1:4563" with message "MYOBContacts"
But - "MYOBContacts" would be a handler in your scripts which the
socket connection is going to make a callback to. It is the definition
of a callback you are making there, not the message sent to the socket.
That happens with a "write" command.
The second line looks like it would be creating a custom property... it
probably wants to look something like -
put theResult into field "ResultField"
However, "TheResult" would currently not be holding anything very
useful. You will need to "Read" from the socket before and place the
result of that into a variable.
More information about the Use-livecode