home *** CD-ROM | disk | FTP | other *** search
- ;
- ; MAIL.RCL
- ;
- ; Mail.rcl is a sample Reflection command file that can be used to
- ; receive VAX/VMS mail and phone messages on your PC while you are
- ; running another PC application program in foreground. To use MAIL.RCL:
- ;
- ; - run Reflection
- ; - logon to your VAX/VMS system
- ; - hit <Alt-F10> to bring up the command line
- ; - enter 'MAIL.RCL' and hit <CR>
- ;
- ; Reflection will then place itself in background mode and return you to
- ; the DOS command prompt. When Reflection detects that you have received
- ; mail or a phone message, it will invoke either the VMS mail or phone
- ; program and place itself in foreground. Reflection will return to
- ; background when you exit the VMS mail or phone utilities. To terminate
- ; the 'MAIL' command file, place Reflection in foreground with the hotkey
- ; (usually <Alt-RightShift>) and enter <Ctrl-C>.
- ;
- background
- q command on
- ;
- ; read the host prompt into v1
- ;
- transmit "^m"
- readhost v1
- readhost v1
- transmit "^m"
- readhost v1
- ;
- ; define strings that indicate new mail and incoming phone call
- ;
- let v2 = "New mail"
- let v3 = "is phoning you"
- ;
- ; Main Loop - this loop is executed each time a mail or phone session
- ; has been completed.
- ;
- :loop
- ;
- ; print message on screen in case user manually switches Reflection
- ; from background to foreground.
- ;
- display "^[[H^[[J"
- display "^[[12;13fWaiting for mail or phone ... enter <CTRL-C> to exit^m"
- ;
- ; loop1 is repeated until a 'mail' or 'phone' message is received from
- ; the host.
- ;
- :loop1
- readhost v4 until "^m"
- ;
- ; is is a mail message?
- ;
- if find(v2,v4) > 0
- transmit 'set prompt ="wrq>>"^m'
- transmit "mail^m"
- wait for "MAIL>"
- transmit "DIR^m"
- else
- ;
- ; is it a phone call?
- ;
- if find(v3,v4) > 0
- transmit 'set prompt ="wrq>>"^m'
- transmit "phone^m"
- wait for "%"
- transmit "answer^m"
- wait 00:00:01
- transmit "^m"
- else
- ;
- ; otherwise, ignore this line.
- ;
- goto loop1
- endif
- endif
- ;
- ; now, switch to foregound; wait until user returns to dcl;
- ; return to background; and go back for more...
- ;
- foreground
- hold for 'wrq>>'
- background
- transmit 'set prompt ="'&v1&'"^m'
- wait for '^j'
- goto loop