Serial communications and Mac OS X

Bill Vlahos bvlahos at jpl.nasa.gov
Wed Dec 5 12:17:19 EST 2001


Gene,

Thanks for the info on the Serial Port Scripting Addition. I have 
contacted the author of it and he is looking at making it work in X but 
sees it as a big job so it won't be ready very soon.

I also contacted the author of ZTerm which is the only OS X native 
application I am aware of which works fine with the KeySpan adapter. He 
sent me the following Apple Developer Links which include programming 
samples for Project Builder and Code Warrior. Perhaps someone can adapt 
these for Revolution.

See:
http://developer.apple.com/qa/dv/dv39.html
and
http://developer.apple.com/samplecode/Sample_Code/Devices_and_Hardware/Serial/
SerialPortSample.htm

Bill Vlahos
Jet Propulsion Laboratory

> Message: 3
> Date: Sat, 01 Dec 2001 19:41:19 -0500
> From: Gene Kennedy <cyberscope at home.com>
> Organization: cyberscope
> To: use-revolution at lists.runrev.com
> Subject: Re: Serial Ports
> Reply-To: use-revolution at lists.runrev.com
>
> It is possible to read/write data from/to serial ports via AppleScript, 
> a KeySpan USB to Serial Adapter and
> a shareware Serial Port Scripting Addition (you can download from 
> various sites).  On my iMac, I can access
> any of the three serial ports (i.e. the internal modem, KeySpan #1 and 
> KeySpan #2) using the above
> combination. The only trick part is using quotes properly in the 
> AppleScript statements.
>
> For example:
>
> -- use a handler to open the desired serial port, write the data to it, 
> then close the port.
>
> On SendIt
>     do "Open serial port " & quote & "P#1USA28X012" & quote as 
> AppleScript  -- this uses KeySpan port#1
>     put the result into thePort  -- some variable to hold the port 
> reference for the scripting addition
>     do "serial port write " & theData & "to " & thePort as AppleScript
>     do "Close serial port " & thePort as AppleScript
> End SendIt
>
>
> Although I am just getting started with Revolution myself, this scheme 
> works reliably for me on an iMac and
> an iBook using System 8.6.1 and 9.1 respectively.  For what it's worth, 
> I have used the KeySpan adapters in
> all of the systems I have delivered over the past four years and never 
> experienced a failure.  I hope I'll
> be able to say that about my apps someday.
>
> PS    I have no experience with OS X so I don't know if the above will 
> apply!
>
> Best regards,
>
> Gene Kennedy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2445 bytes
Desc: not available
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20011205/87cd3273/attachment.bin>


More information about the use-livecode mailing list