TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: divtiply on August 26, 2014, 02:29:34 PM

Title: Read serial port snippet
Post by: divtiply on August 26, 2014, 02:29:34 PM
For those who need it:

(setq com (open "\\\\.\\COM1" "r"))
...
(close com)
Title: Re: Read serial port snippet
Post by: hmspe on August 26, 2014, 04:25:54 PM
Is there similar syntax for stdin (keyboard)?
Title: Re: Read serial port snippet
Post by: divtiply on August 26, 2014, 06:17:53 PM
Is there similar syntax for stdin (keyboard)?

Short answer: NO.

Long answer: yes, but only for _console_ applications (which AutoCAD is not) - there are CONIN$ and CONOUT$ device files.
Title: Re: Read serial port snippet
Post by: hmspe on August 26, 2014, 09:07:17 PM
Thanks.  I was hoping for an easy way to read the keys that grread does not return.