! NOTES$COMMAND.TPU ! 05-May-1988 MFD ! Rehabilitation Pilot ! ! 09-Jun-1988 MFD Modified to "UNMAP" the comma on keypad ! that previously performed a "NEXT/UNSEEN" ! command. ! 12-Sep-1988 MFD Reinstated the NEXT/UNSEEN key and altered ! MAIL to MAIL/EDIT, we can set up a system- ! wide EDTINI.SYS file. ! 05-June-1989 MFD Changed reference to DUB0:[NOTES] to the ! logical NOTES$UTILITY. ! 15-Aug-1989 MFD Added definition of DO key to permit notes ! to be extracted to terminal printer port. PROCEDURE local_print !++ ! FUNCTIONAL DESCRIPTION: ! ! This procedure allows a note reader to print a note to a printer ! attached to their terminal. It will prompt for a range of notes ! to print. If not specified, it will default to the current note. ! !-- LOCAL print_range; ON_ERROR ENDON_ERROR; print_range := read_line("Enter range of notes to print: "); IF LENGTH(print_range) = 0 THEN IF LAST_KEY = CTRL_Z_KEY THEN RETURN ELSE print_range := "" ENDIF ENDIF; NOTES$DO_COMMAND("EXTRACT SYS$LOGIN:NOTE_PRINT_TEMP.TMP " + print_range); SPAWN ("@NOTES$UTILITY:LOCAL_NOTE_PRINT.COM") ENDPROCEDURE ! Set bell to ring for broadcast messages. set ( bell, broadcast, on); ! Set Notes buffer width to 70. set (margins, notes$x_edit_buffer, 5, 70); set (margins, notes$x_mail_buffer, 5, 70); ! Define new function keys and remap existing functions keys. ! Help for the keys defined here can be found in SYS$HELP:NOTES$HELP_USER.HLB define_key ("notes$do_command ('back topic')", UP, "NOTES_USER Back_Topic", notes$kt_user_keys); define_key ("notes$do_command ('next topic')", DOWN, "NOTES_USER Next_Topic", notes$kt_user_keys); define_key ("notes$do_command ('back reply')", LEFT, "NOTES_USER Back_Reply", notes$kt_user_keys); define_key ("notes$do_command ('next reply')", RIGHT, "NOTES_USER Next_Reply", notes$kt_user_keys); define_key (lookup_key (KP5, program, notes$kt_noteskeys), UP, lookup_key (KP5, comment, notes$kt_noteskeys), notes$kt_user_keys); define_key (lookup_key (KP2, program, notes$kt_noteskeys), DOWN, lookup_key (KP2, comment, notes$kt_noteskeys), notes$kt_user_keys); define_key ("notes$do_command ('spawn @NOTES$UTILITY:SETPASS.COM')", PF3, "NOTES_USER Change_Password", notes$kt_user_keys); define_key ("notes$do_command ('reply')", F17, "NOTES_USER Reply", notes$kt_user_keys); define_key ("notes$do_command ('forward')", F18, "NOTES_USER Forward", notes$kt_user_keys); define_key ("notes$do_command ('spawn mail/edit')", F19, "NOTES_USER Mail", notes$kt_user_keys); define_key ("notes$do_command ('write')", F20, "NOTES_USER Write", notes$kt_user_keys); define_key ('local_print', DO, "NOTES_USER Local_Print", notes$kt_user_keys); ! Finally we want to "UNMAP" the "NEXT/UNSEEN" key (COMMA). ! We will define this key to do nothing. !define_key ("notes$do_command ('')", COMMA,"", notes$kt_user_keys);