Getting in a mix-up with COMn

Jerry Jensen jhj at jhj.com
Fri Apr 3 15:01:47 EDT 2015


On Apr 3, 2015, at 8:05 AM, Richmond <richmondmathewson at gmail.com> wrote:
> 
>> read from file "COM3:" until end
>> 
>> is the Dictionary example.
>> 
> 
> Indeed; although the problem seems to be with 'end'.

I have used the following with a driver for a Keyspan USB-to-serial adapter on a mac:

 read from driver tWxPort until empty in 100 milliseconds

The in time part at the end is a timeout - without that it can just hang. If it times out, the result is set to "time out" or something like that, so you can (should) check for it.

I think the word empty is what you want, rather than end or EOF. Those both expect something explicit marking the end to be sent, I think, whereas most things just stop sending (as in empty).

Wishing you good luck, this can be frustrating until it starts working when you get all your ducks (turtles?) in a row.
.Jerry





More information about the use-livecode mailing list