home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / BLST10_2.ZIP / SAMPLES / RUNME.SCR < prev    next >
Encoding:
Text File  |  1990-04-30  |  2.8 KB  |  66 lines

  1. # rev 8.4.1
  2. #
  3. ###########################################################################
  4. # runme.scr - List scriptfiles in the current directory                   #
  5. #                                                                         #
  6. # This script displays a list of the script files (*.scr) in the current  #
  7. # directory. It then prompts for the name of the script file you want to  #
  8. # execute.                                                                #
  9. ###########################################################################
  10. #
  11. #
  12. .top
  13. clear                           # clear screen
  14. cursor 0,0                      # home the cursor
  15. display "       The following is a list of BLAST scripts in the current directory:"
  16. display "       ------------------------------------------------------------------"
  17. display ""
  18. menu on                         # display all menus as they are used
  19. local                           # do a local list of the current directory
  20. list                            # this also could be done with the LLIST
  21. short                           # command
  22. *.scr
  23. esc
  24. menu off                        # return to non-menu display
  25. #                               # prompt for the script to execute
  26. ask "Enter the name of the script or (ESC) to exit.", @name
  27. if @status not = "0" return 0   # exit if ESC was hit
  28. lower @name                     # make the entry all lower case
  29. #
  30. #                               # check to see if the script requested
  31. #                               # is one of the following
  32. if @name = "listsys"
  33.   clear
  34.   cursor 1,0
  35.   display "                               - LISTSYS.SCR -"
  36.   display "    This script reads the systems.scr library and interprets the entries"
  37.   display "    and displays an English language listing of the system types supported."
  38.   display "    It also allows a selected system type to be used in the current setup."
  39.   wait 7
  40.   goto .run
  41. end
  42. if @name = "listmod"
  43.   clear
  44.   cursor 1,0
  45.   display "                               - LISTMOD.SCR -"
  46.   display "    This script reads the modems.scr library and interprets the entries"
  47.   display "    and displays an English language listing of the modem types supported."
  48.   display "    It also allows a selected modem type to be used in the current setup."
  49.   wait 7
  50.   goto .run
  51. end
  52. #                               # clear the screen
  53. clear
  54. cursor 5,0
  55. display @name,"Now executing script  file <",@name,".scr>."
  56. #                               # run the script entered
  57. .run
  58. call @name                      # script call command
  59. if @status not = "0"            # test if the call was successful
  60.   display "Could not execute the script <",@name,".scr>."
  61.   ask "Execute another script? (y/n)" @ask
  62.   lower @ask
  63.   if @ask = "y" goto .top
  64. return 0
  65.  
  66.