home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / BLST10_2.ZIP / SAMPLES / VAXPHONE.SCR < prev   
Encoding:
Text File  |  1990-08-22  |  1.6 KB  |  42 lines

  1. Set @Ground = "Foreground"        # Flip screen to show DOS prompt
  2. #
  3. #
  4. Set @Autoground = "ON"            # Set automatic ground switching to on
  5. #
  6. #
  7. .MainLoop                # This is the main operating loop
  8. Set @userif = "ON"            # Turn user interface on, just in case
  9. #
  10. # This SETTRAP will save up to 25 of the last characters to come through
  11. # the comm port. There is no character count maximum ( set to 0 ).
  12. #
  13. SETTRAP @message, 25 , 0        # Tell TTRAP to save comport data
  14. TTRAP 0:0, " is phoning you",         # Trap for the phone message
  15. #
  16. if @status not = "1" goto .MainLoop    # any event other than the string match
  17. call parsname                # strip out the user name from the data
  18. if @message = ""  set @message = "Someone"  # if null then set to general message
  19. strcat @message," is trying to phone you, would you like to talk to him/her [Y/N]"
  20. #
  21. ask @message, @ans            # prompt to see if user wants to talk 
  22. if @ans = "Y" or @ans = "y"        # chech the users response
  23.   set @userif = "OFF"
  24.   clear                    # clear the screen
  25.   cursor 10,10                # position in the middle of the screen
  26.   put "TYPE ATTENTION KEY TWICE AFTER EXITING PHONE"  # tell them what to do
  27.   wait :02                # wait so they can read it
  28.   tsend cr,"phone ans",cr        # tell VMS to answer the phone
  29.   terminal                  # sit in teminal mode until done
  30.   Set @Ground = "Foreground"        # reset the ground to DOS or application
  31. end
  32. else                    # user responded with a 'N'
  33.   Tsend cr,"phone reject",cr        # tell VMS to reject the phone call
  34.   Ttrap :05, "%"            # Wait for the phone prompt
  35.   Tsend "EXIT",cr            # exit phone
  36.   Set @Ground = "Foreground"        # reset the ground to DOS or application
  37. end
  38. wait :01 IDLE
  39. goto .MainLoop                # start all over
  40.  
  41.  
  42.