home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / mail / elm / 2028 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.8 KB

  1. Path: sparky!uunet!gatech!prism!cmdl.gatech.edu!meshlema
  2. From: meshlema@cmdl.gatech.edu (Matthew Eshleman)
  3. Newsgroups: comp.mail.elm
  4. Subject: localprinting
  5. Message-ID: <64691@hydra.gatech.EDU>
  6. Date: 30 Jul 92 17:19:43 GMT
  7. Sender: news@prism.gatech.EDU
  8. Organization: Georgia Tech Research Institute
  9. Lines: 50
  10. Originator: meshlema@cmdl.gatech.edu
  11.  
  12. Several weeks ago I posted about printing to a local printer from
  13. within elm.  I received several responses, including someone
  14. wanting me to post the results, so here they go!
  15.  
  16. Unfortunaltly I don't have the original script that was sent to
  17. me.  This is essentially the same script, with a menu added
  18. for those who wanted to print to the network printer.  Thanks
  19. go to Robert L. Howard who sent us the original script.  Thanks!
  20.  
  21. I`ve place comments before the lines that are actually important.
  22.  
  23.  
  24. #!/bin/sh
  25. # This was supposed to clear the screen, but it doesn't work.
  26. /usr/5bin/echo '\0331;1H\0330J\c' > /dev/tty
  27. /usr/5bin/echo '\nPlease choose destination printer:\n\n' > /dev/tty
  28. /usr/5bin/echo '   1) Your Printer\n'       > /dev/tty
  29. /usr/5bin/echo '   2) Network Printer \n' > /dev/tty
  30. /usr/5bin/echo 'Choice:\c'> /dev/tty
  31. read REPLY            > /dev/tty
  32. /usr/5bin/echo $REPLY > /dev/tty
  33. if test "$REPLY" = "1" 
  34. then
  35. #/usr/5bin/echo 'Your Printer ';exit
  36. #These next seven lines do the printing to the local printer. 
  37. /usr/5bin/echo '\033[5i\c' > /dev/tty
  38. /usr/bin/sleep 1
  39. /usr/bin/cat $* > /dev/tty
  40. /usr/bin/sleep 1
  41. /usr/5bin/echo '\033[4i\c' > /dev/tty
  42. /usr/bin/echo  '' > /dev/tty
  43. /usr/bin/echo  '' > /dev/tty
  44. #These lines print to our network printer.
  45. elif test "$REPLY" = "2"
  46. then
  47. #/usr/5bin/echo 'network printer';exit  
  48. print $*
  49. else
  50. echo 'Illegal choice' > /dev/tty
  51. fi
  52. /usr/bin/echo  'Hit ^L to have the screen redraw...' > /dev/tty
  53.  
  54.  
  55.  
  56. To run this, go to the elm options menu, choose print, and use
  57.    'localprint %s'
  58.  
  59. Good Luck!
  60.  
  61. ME
  62.