Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.mac.system > #58733 > unrolled thread
| Started by | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| First post | 2014-04-20 15:50 -0400 |
| Last post | 2014-04-21 21:17 -0400 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.sys.mac.system
Interactive printing to serial printer JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-04-20 15:50 -0400
Re: Interactive printing to serial printer Alan Baker <alangbaker@telus.net> - 2014-04-20 12:54 -0700
Re: Interactive printing to serial printer JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-04-20 16:28 -0400
Re: Interactive printing to serial printer Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-04-21 04:22 +0000
Re: Interactive printing to serial printer JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-04-21 04:29 -0400
Re: Interactive printing to serial printer JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-04-21 21:17 -0400
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2014-04-20 15:50 -0400 |
| Subject | Interactive printing to serial printer |
| Message-ID | <53542501$0$47856$c3e8da3$5d8fb80f@news.astraweb.com> |
The task: using old serial printer (C-Itoh) with the roller removed to label slides. (lots of them). In the past, I did this on a DCL script on VMS which would create a string such as "19890436" , send it to printer with a carriage return, and if I then just pressed "return" on terminal, would do the same with "19890437" So I could label 36 slides by pressing return after switching slides in the printer. I had a few commands I could enter to reset counts, advance to next roll of film, reprint last number etc. Instead of firing up my old VMS box, would like to see what sort of possible implementations on OS-X are possible. The serial ports are on my X-serve. Does Applescript have the ability to open, set and send data to a serial port ? If so, I could write a very simple GUI app to do the job. Otherwise, amd I better off doing this in bash ? PHP in line command mode ? Anything else out there that I completely forgot ? I may choose to connect my printer to a VT220 terminal, in which case the script would prefix the "198980417" string with an escape sequence to get terminal to send the following data to the printer (and an escape sequence to return to terminal mode).
[toc] | [next] | [standalone]
| From | Alan Baker <alangbaker@telus.net> |
|---|---|
| Date | 2014-04-20 12:54 -0700 |
| Message-ID | <lj18kr$i82$1@news.datemas.de> |
| In reply to | #58733 |
On 2014-04-20 19:50:24 +0000, JF Mezei said: > The task: using old serial printer (C-Itoh) with the roller removed to > label slides. (lots of them). > > In the past, I did this on a DCL script on VMS which would create a > string such as "19890436" , send it to printer with a carriage return, > and if I then just pressed "return" on terminal, would do the same with > "19890437" > > So I could label 36 slides by pressing return after switching slides in > the printer. > > I had a few commands I could enter to reset counts, advance to next roll > of film, reprint last number etc. > > Instead of firing up my old VMS box, would like to see what sort of > possible implementations on OS-X are possible. The serial ports are on > my X-serve. > > > Does Applescript have the ability to open, set and send data to a serial > port ? If so, I could write a very simple GUI app to do the job. > > Otherwise, amd I better off doing this in bash ? PHP in line command > mode ? Anything else out there that I completely forgot ? > > I may choose to connect my printer to a VT220 terminal, in which case > the script would prefix the "198980417" string with an escape sequence > to get terminal to send the following data to the printer (and an escape > sequence to return to terminal mode). 'A Scripting Addition to allow access to an internal modem or standard serial ports from AppleScript. Requires Mac OS 10.5 or higher and an internal modem or serial port adapter. Includes AppleScript examples and an Address Book plug-in to dial phone numbers. Version 2.1.2. 32 / 64 bit Universal Binary. Free." <http://alteredhorizons.capnix.com/MacSoft.html> That was less than 20 seconds on Google, BTW.
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2014-04-20 16:28 -0400 |
| Message-ID | <53542df8$0$59803$c3e8da3$e074e489@news.astraweb.com> |
| In reply to | #58734 |
On 14-04-20 15:54, Alan Baker wrote: > <http://alteredhorizons.capnix.com/MacSoft.html> Thanks for link. > That was less than 20 seconds on Google, BTW. But without any expreience from others, it will take me far longer to experiment and figure out if it actually does work. There are reasons people come here for feedback. And it also means that serial port support is NOT included with Applescript since one requires an add-on.
[toc] | [prev] | [next] | [standalone]
| From | Lewis <g.kreme@gmail.com.dontsendmecopies> |
|---|---|
| Date | 2014-04-21 04:22 +0000 |
| Message-ID | <slrnll9788.1k5e.g.kreme@amelia.local> |
| In reply to | #58733 |
In message <53542501$0$47856$c3e8da3$5d8fb80f@news.astraweb.com> JF Mezei <jfmezei.spamnot@vaxination.ca> wrote: > Does Applescript have the ability to open, set and send data to a serial > port? No, it doesn't. > Otherwise, amd I better off doing this in bash ? PHP in line command > mode ? Anything else out there that I completely forgot ? The last time I had to talk to a serial port in OS X I used a command line comm program to send raw commands to the device. I can't remember what the program was, but it was dead simple to do once I got it installed. It might have been minicomm, but that doesn’t sound quite right. <https://alioth.debian.org/projects/minicom/> If you want a GUI, zterm runs under 10.9, or if you really want to use AppleScript you can work around its lack of serial by using screen in the terminal, but I've never done this myself and I don't know how well it works. the syntax is along the lines of: Tell app "Terminal" do shell script with command "screen /dev/tty.<something>" end save that as an app, double click, and you have a screen session talking directly to the serial port. Screen is ... odd if you've not used it. -- You are responsible for your Rose
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2014-04-21 04:29 -0400 |
| Message-ID | <5354d6f7$0$1325$c3e8da3$50776f34@news.astraweb.com> |
| In reply to | #58753 |
On 14-04-21 00:22, Lewis wrote: > save that as an app, double click, and you have a screen session talking > directly to the serial port. Screen is ... odd if you've not used it. neither screen nor cu do the job because I would then have to type in the whole strings for every slide (eg: 19890431 <cr> ) So I want a piece of software that generates the string when I press return, sends it to printer, increments slide nuber and waits for me to press return again. (my hands are busy handling slides to and from printer so they get labeled.)
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2014-04-21 21:17 -0400 |
| Message-ID | <5355c343$0$22740$c3e8da3$69010069@news.astraweb.com> |
| In reply to | #58753 |
Ouch ! Had not realised this... since the last time I had dabbed in AppleScript with Xcode, Apple change the whole kit and kaboodle from AppleScript Studio to AppleScriptObjC. In other words, basically objective C. Would the "framework" to access serial port from Applescript written for 10.4 be compatible with the newfangled Applescript/Objective-C introduced with Snow Leopard ? I know there is a way to enable the old AppleScript Studio, so if the old code can't be used with the new approach, I would have to revert to AppleScript Studio. (sorry, I don't have experience with Apple Script and not sure of all the various flavours of it, it appears there is a totally different flavour for use within Xcode from when you use to build normal scripts)
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.mac.system
csiph-web