home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / exc25.zip / TESTEXC.SCR < prev    next >
Text File  |  1993-06-16  |  4KB  |  155 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 prevents 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.   CLEAR
  27.   SCRMAX 80 50
  28.   CASE ON
  29.   DELAY 2
  30.   WAITFOR NOT "WordPerfect"
  31.   CASE OFF
  32.   WINMAX
  33.  
  34. :LOOP
  35.   SEARCH "DOC 1 PG 1"
  36.   IFN LOOP
  37.  
  38.   SHOWAT 17 49
  39.   SHOW 12 "Found \qDoc 1 Pg 1\q                     "
  40.   CASE ON
  41.   DELAY 2
  42.  
  43. ;  BEEP
  44.   SHOW 140 "Testing WAITSCR in window - Press space bar."
  45.   WINROWS 15 50
  46.   WINCOLS 60 77
  47.   WAITSCR
  48.   WINMAX
  49.   SHOW 12 "Found screen change in window.              "
  50.   DELAY 2
  51.  
  52.   SHOW 12 "Loading TESTEXC.SCR                       "
  53.   KEY <BKSP>
  54.   KEY <SHF+F10>
  55.   TYPE "C:\EXC\TESTEXC.SCR"
  56.   KEY <ENTER>
  57.   WAITFOR "WAITSCR"
  58.  
  59.   SHOW 12 "Highlighting rows 15 50                     "
  60.   WINROWS 15 50
  61.   SHOWIN 79
  62.   DELAY 2
  63.   HIDEWIN
  64.   SHOW 12 "Highlighting rows 15 50, cols 60 77        "
  65.   WINCOLS 60 77
  66.   SHOWIN 79
  67.   DELAY 2
  68.   HIDEWIN
  69.   SHOW 12 "Now Testing WINMAX                        "
  70.   DELAY 1
  71.   WINMAX
  72.   SHOWIN 79
  73.   DELAY 2
  74.   HIDEWIN
  75.  
  76.   SHOW 12 "Testing a LOOP using ON: 3 beeps          "
  77. :LOOP1
  78.  ON 3 ENDLOOP1
  79. ; BEEP
  80.  TICKS 7
  81.  GOTO LOOP1
  82. :ENDLOOP1
  83.  
  84.   SHOW 12 "Typing \qScroll Lock\q at col 14, row 8   "
  85.   CURSOR 14 8
  86.   KEY <DEL> 11
  87.   TYPE "Scroll Lock"
  88.   DELAY 1
  89.   SHOW 12 "Moving cursor back to top row.            "
  90.   CURSOR 0 2
  91.   DELAY 1
  92.   SHOW 12 "Moving cursor back home.                  "
  93.   CURSOR 1 0
  94.   DELAY 1
  95.  
  96.   SHOW 12 "Locating Scroll Lock and changing it back."
  97.   LOCATE "Scroll Lock"
  98.   TYPE "SCROLL LOCK"
  99.   KEY <DEL> 11
  100.   CURSOR 1 2
  101.  
  102.   SHOW 12 "Testing /CASE/READ/LOOK IN A window.       "
  103.   WINROWS 30 46
  104.   WINCOLS 16 36
  105.   SHOWIN 79
  106.   DELAY 2
  107.   HIDEWIN
  108.   CASE OFF
  109.   READ
  110.   LOOK "wordperfect"
  111.   CASE ON
  112.   IFY TLOC
  113.   GOTO RLERR
  114.  
  115. :TLOC
  116.   SHOW 12 "Test LOCATE in a window beyond line 25.   "
  117.   LOCATE "WordPerfect"
  118.   TYPE "WORDPERFECT"
  119.   KEY <DEL> 11
  120.   CURSOR 1 2
  121.   GOTO TSTTO
  122.  
  123. :RLERR
  124.   SHOW 12 "Error in CASE/READ/LOOK.                  "
  125.   BEEP
  126.   BEEP
  127.   BEEP
  128.   DELAY 3
  129.  
  130. :TSTTO
  131.   SHOW 12 "Testing a 4 second timeout.               "
  132.   SETWAIT 4
  133. ;  BEEP
  134.   TIMEOUT TSTTF
  135.   WAITFOR "ZzZz"
  136.  
  137. :TSTTF
  138. ;  BEEP
  139.   KEY <PGDN> 4
  140.   KEY <ENTER>
  141.   TYPFILE TESTEXC.TXT
  142.   KEY <ENTER> 2
  143.   TYPFILE TESTEXC.TXT <SPACE>
  144.   KEY <ENTER> 2
  145.   TYPFILE TESTEXC.TXT <ENTER>
  146.   
  147. ;  BEEP
  148.   SHOW 140 "Paused - Press Scroll Lock                "
  149.   PAUSE
  150.   SHOW 12 "Done, exiting WordPerfect                 "
  151.   DELAY 2
  152.   KEY <F7>
  153.   TYPE "NY"
  154.   CLEAR
  155.