Path: utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!rutgers!iuvax!bsu-cs!cfchiesa From: cfchiesa@bsu-cs.UUCP (Christopher F. Chiesa) Newsgroups: comp.os.vms Subject: Re: Symbols in mail? Message-ID: <1762@bsu-cs.UUCP> Date: 2 Jan 88 04:58:03 GMT References: <8712312112.AA01825@ucbvax.Berkeley.EDU> Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 44 Summary: Yes, you can define commands in Mail - sort of. In article <8712312112.AA01825@ucbvax.Berkeley.EDU>, rdavenport@GTEWIS.ARPA writes: > I would like to know if there is a way to define symbols in DCL that can > be used when in MAIL. What I'd like is to be able to define something like: > $ mail$ext_vax :== extract/append [.mail]info_vax.text > > so I can say in mail : > > MAIL> ext_vax > > and have it execute "extract/append [.mail]info_vax.text". You can't do this, exactly, but you CAN assign any command-string you like, to any "application keypad" key. The only requirement, of course, is that you must use a terminal that HAS an application keypad. Within Mail, the command to do this is DEFINE/KEY (I believe it also accepts several qualifiers, particularly those dealing with /IF_STATE and /LOCK_STATE, which effectively multiply the number of function keys you have available). See HELP DEFINE/KEY at the Mail> prompt for further information. I assume you'd like your keypad definitions to take effect automatically when you enter Mail; this, too, can be done. In DCL, define the logical name MAIL$INIT to the name of a file containing the DEFINE/KEY commands you want activated when you go in. No "$" or other prefix needed, one command per line. The example you give above, if bound to, say, the "5" key on the keypad, might look like this: DEFINE/KEY KP5 "extract/append [.mail]info_vax.text" As is, this would require you to press RETURN after the keypad-5; to eliminate that necessity, you would use the /TERMINATE qualifier: DEFINE/KEY/TERMINATE ... etc.... Hope this does what you want! Chris Chiesa Senior, CS Dept. Ball State University Muncie, IN (317) 288-2957 (home)