home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / e / exc20.zip / TESTEXC.SCR < prev    next >
Text File  |  1993-03-05  |  4KB  |  152 lines

  1. ; This script is used to test EXC.EXE functionality.  It is run against
  2. ; WordPerfect 5.1 for DOS (WP.EXE).  WP needs to be set up to switch to
  3. ; 80 X 50 video mode on initialization.  This can be done in the SETUP/
  4. ; DISPLAY screen if you have VGA capability.  It uses every command
  5. ; available in EXC except for TIME which must be tested seperately.  To
  6. ; test the abort and pause/resume keys, type LEFT SHIFT+RIGHT SHIFT
  7. ; (abort) or SCROLL LOCK (pause/resume toggle) whenever you wish.
  8.  
  9. ; If you don't have WOrdPerfect 5.1 for DOS, feel free to modify it to
  10. ; work with your word processor of editor.  This could be a very good
  11. ; excercise in learning how scripts are coded and how they work.  Don't
  12. ; try to use it with DOS 5's EDIT.  There is a quirk that prevenst EDIT
  13. ; from working properly with a keyboard stuffer.  It requires hardware
  14. ; keyboard interrupts.
  15.  
  16. ; Please do not use this as a model of how a script should be written.  
  17. ; In order to test every function, I use some pretty hokey coding that 
  18. ; would not be best used in that manner in real world apllications.  
  19. ; Also I slow down operation considerably with delays so that I can 
  20. ; study the results of various tests as the script proceeds.
  21.  
  22. ; This can be used, however for examples of how each command should be 
  23. ; coded and it will demonstrate the results of that code.
  24. ;
  25. ;
  26.   DELAY 2
  27.   SCRMAX 80 50
  28.   CASE ON
  29.   WAITFOR NOT "WordPerfect"
  30.  
  31. :LOOP
  32.   SEARCH "Font"
  33.   IFN LOOP
  34.  
  35.   WINMAX
  36.   WAITFOR "0.8\q"
  37.   SHOWAT 17 49
  38.   SHOW 12 "Found \q0.8\q\q                            "
  39.   DELAY 2
  40.  
  41.   BEEP
  42.   SHOW 140 "Testing WAITSCR in window - Press space bar."
  43.   WINROWS 15 50
  44.   WINCOLS 60 77
  45.   WAITSCR
  46.   WINMAX
  47.   SHOW 12 "Found screen change in window.              "
  48.   DELAY 2
  49.  
  50.   SHOW 12 "Loading TESTEXC.SCR                       "
  51.   KEY <BKSP>
  52.   KEY <SHF+F10>
  53.   TYPE "C:\EXC\TESTEXC.SCR"
  54.   KEY <ENTER>
  55.   WAITFOR "WAITSCR"
  56.  
  57.   SHOW 12 "Highlighting rows 15 50                     "
  58.   WINROWS 15 50
  59.   SHOWIN 79
  60.   DELAY 2
  61.   HIDEWIN
  62.   SHOW 12 "Highlighting rows 15 50, cols 60 77        "
  63.   WINCOLS 60 77
  64.   SHOWIN 79
  65.   DELAY 2
  66.   HIDEWIN
  67.   SHOW 12 "Now Testing WINMAX                        "
  68.   DELAY 1
  69.   WINMAX
  70.   SHOWIN 79
  71.   DELAY 2
  72.   HIDEWIN
  73.  
  74.   SHOW 12 "Testing a LOOP using ON: 3 beeps          "
  75. :LOOP1
  76.  ON 3 ENDLOOP1
  77.  BEEP
  78.  TICKS 7
  79.  GOTO LOOP1
  80. :ENDLOOP1
  81.  
  82.   SHOW 12 "Typing \qScroll Lock\q at col 14, row 8   "
  83.   CURSOR 14 8
  84.   KEY <DEL> 11
  85.   TYPE "Scroll Lock"
  86.   DELAY 1
  87.   SHOW 12 "Moving cursor back to top row.            "
  88.   CURSOR 0 2
  89.   DELAY 1
  90.   SHOW 12 "Moving cursor back home.                  "
  91.   CURSOR 1 0
  92.   DELAY 1
  93.  
  94.   SHOW 12 "Locating Scroll Lock and changing it back."
  95.   LOCATE "Scroll Lock"
  96.   TYPE "SCROLL LOCK"
  97.   KEY <DEL> 11
  98.   CURSOR 1 2
  99.  
  100.   SHOW 12 "Testing /CASE/READ/LOOK IN A window.       "
  101.   WINROWS 30 46
  102.   WINCOLS 16 36
  103.   SHOWIN 79
  104.   DELAY 2
  105.   HIDEWIN
  106.   CASE OFF
  107.   READ
  108.   LOOK "wordperfect"
  109.   CASE ON
  110.   IFY TLOC
  111.   GOTO RLERR
  112.  
  113. :TLOC
  114.   SHOW 12 "Test LOCATE in a window beyond line 25.   "
  115.   LOCATE "WordPerfect"
  116.   TYPE "WORDPERFECT"
  117.   KEY <DEL> 11
  118.   CURSOR 1 2
  119.   GOTO TSTTO
  120.  
  121. :RLERR
  122.   SHOW 12 "Error in CASE/READ/LOOK.                  "
  123.   BEEP
  124.   BEEP
  125.   BEEP
  126.   DELAY 3
  127.  
  128. :TSTTO
  129.   SHOW 12 "Testing a 4 second timeout.               "
  130.   SETWAIT 4
  131.   BEEP
  132.   TIMEOUT TSTTF
  133.   WAITFOR "ZzZz"
  134.  
  135. :TSTTF
  136.   BEEP
  137.   KEY <PGDN> 4
  138.   KEY <ENTER>
  139.   TYPFILE TESTEXC.TXT
  140.   KEY <ENTER> 2
  141.   TYPFILE TESTEXC.TXT <SPACE>
  142.   KEY <ENTER> 2
  143.   TYPFILE TESTEXC.TXT <ENTER>
  144.   
  145.   BEEP
  146.   SHOW 140 "Paused - Press Scroll Lock                "
  147.   PAUSE
  148.   SHOW 12 "Done, exiting WordPerfect                 "
  149.   KEY <F7>
  150.   TYPE "NY"
  151.   CLEAR
  152.