!Last Modified: 11-OCT-1988 14:48:36.16, By: FLEMING ! Routine to print the current screen or current buffer as it appears ! on the screen. This procedure will create the buffer "printscreen.scr" ! if it doesn't exist, and copy the screen into the buffer. It next writes ! out the buffer after prompting for a filename, and then does a ! DCL-spawn to send the file to the printer procedure eve_pscreen local other_line,this_line,this_position,loop_buffer,this_name,found, print_range,loc_buffer; this_name := "PRINTSCREEN.SCR"; ! default name of transfer buffer this_position := mark(none); ! don't get lost ! total rows on screen other_line := get_info(current_window,"visible_bottom"); this_line := get_info(current_window,"current_row"); this_line := this_line - 1; ! row one is "1" not "0" move_horizontal(-current_offset); ! goto beginning of current line move_vertical(-this_line); ! backup to top of view marker1 := select(none); ! start select move_vertical(other_line); ! move to bottom view print_range := select_range; ! record range created marker1 := 0; !stop selection ! try to find the transfer buffer loop_buffer := get_info(buffers,"first"); found := 0; loop exitif loop_buffer = 0; if (this_name = get_info(loop_buffer,"name")) then found := 1; endif; exitif found; loop_buffer := get_info(buffers,"next"); endloop; if (found = 0) then ! create it loop_buffer := create_buffer("printscreen.scr"); position(loop_buffer); else ! erase it and use again position(loop_buffer); message("erasing buffer"); erase(loop_buffer); endif; copy_text(print_range); ! copy text to it eve_print_buffer; ! print it position(this_position); ! go home endprocedure