home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!prism!cmdl.gatech.edu!meshlema
- From: meshlema@cmdl.gatech.edu (Matthew Eshleman)
- Newsgroups: comp.mail.elm
- Subject: localprinting
- Message-ID: <64691@hydra.gatech.EDU>
- Date: 30 Jul 92 17:19:43 GMT
- Sender: news@prism.gatech.EDU
- Organization: Georgia Tech Research Institute
- Lines: 50
- Originator: meshlema@cmdl.gatech.edu
-
- Several weeks ago I posted about printing to a local printer from
- within elm. I received several responses, including someone
- wanting me to post the results, so here they go!
-
- Unfortunaltly I don't have the original script that was sent to
- me. This is essentially the same script, with a menu added
- for those who wanted to print to the network printer. Thanks
- go to Robert L. Howard who sent us the original script. Thanks!
-
- I`ve place comments before the lines that are actually important.
-
-
- #!/bin/sh
- # This was supposed to clear the screen, but it doesn't work.
- /usr/5bin/echo '\0331;1H\0330J\c' > /dev/tty
- /usr/5bin/echo '\nPlease choose destination printer:\n\n' > /dev/tty
- /usr/5bin/echo ' 1) Your Printer\n' > /dev/tty
- /usr/5bin/echo ' 2) Network Printer \n' > /dev/tty
- /usr/5bin/echo 'Choice:\c'> /dev/tty
- read REPLY > /dev/tty
- /usr/5bin/echo $REPLY > /dev/tty
- if test "$REPLY" = "1"
- then
- #/usr/5bin/echo 'Your Printer ';exit
- #These next seven lines do the printing to the local printer.
- /usr/5bin/echo '\033[5i\c' > /dev/tty
- /usr/bin/sleep 1
- /usr/bin/cat $* > /dev/tty
- /usr/bin/sleep 1
- /usr/5bin/echo '\033[4i\c' > /dev/tty
- /usr/bin/echo '' > /dev/tty
- /usr/bin/echo '' > /dev/tty
- #These lines print to our network printer.
- elif test "$REPLY" = "2"
- then
- #/usr/5bin/echo 'network printer';exit
- print $*
- else
- echo 'Illegal choice' > /dev/tty
- fi
- /usr/bin/echo 'Hit ^L to have the screen redraw...' > /dev/tty
-
-
-
- To run this, go to the elm options menu, choose print, and use
- 'localprint %s'
-
- Good Luck!
-
- ME
-