home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / SLRN0931 / MACROS / TTYPRINT.SL < prev    next >
Text File  |  1997-02-23  |  510b  |  26 lines

  1. % This function prints the currently selected article on a printer attached
  2. % to the terminal.  It demonstates the 
  3. define tty_print_article () 
  4. {
  5.    variable buf;
  6.  
  7.    art_select_article ();
  8.    
  9.    if (get_yes_no_cancel ("Are you sure you want to print article") <= 0)
  10.      return;
  11.  
  12.    buf = article_as_string ();
  13.  
  14.    message ("printing...");
  15.    update ();
  16.    
  17.    tt_send ("\e[5i");
  18.    tt_send (buf);
  19.    tt_send ("\e[4i");
  20.  
  21.    message ("printing...done");
  22. }
  23.  
  24.  
  25. definekey ("tty_print_article", "^P", "article");
  26.