home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
exc25.zip
/
TESTEXC.SCR
< prev
next >
Wrap
Text File
|
1993-06-16
|
4KB
|
155 lines
; This script is used to test EXC.EXE functionality. It is run against
; WordPerfect 5.1 for DOS (WP.EXE). WP needs to be set up to switch to
; 80 X 50 video mode on initialization. This can be done in the SETUP/
; DISPLAY screen if you have VGA capability. It uses every command
; available in EXC except for TIME which must be tested seperately. To
; test the abort and pause/resume keys, type LEFT SHIFT+RIGHT SHIFT
; (abort) or SCROLL LOCK (pause/resume toggle) whenever you wish.
; If you don't have WOrdPerfect 5.1 for DOS, feel free to modify it to
; work with your word processor of editor. This could be a very good
; excercise in learning how scripts are coded and how they work. Don't
; try to use it with DOS 5's EDIT. There is a quirk that prevents EDIT
; from working properly with a keyboard stuffer. It requires hardware
; keyboard interrupts.
; Please do not use this as a model of how a script should be written.
; In order to test every function, I use some pretty hokey coding that
; would not be best used in that manner in real world apllications.
; Also I slow down operation considerably with delays so that I can
; study the results of various tests as the script proceeds.
; This can be used, however for examples of how each command should be
; coded and it will demonstrate the results of that code.
;
;
CLEAR
SCRMAX 80 50
CASE ON
DELAY 2
WAITFOR NOT "WordPerfect"
CASE OFF
WINMAX
:LOOP
SEARCH "DOC 1 PG 1"
IFN LOOP
SHOWAT 17 49
SHOW 12 "Found \qDoc 1 Pg 1\q "
CASE ON
DELAY 2
; BEEP
SHOW 140 "Testing WAITSCR in window - Press space bar."
WINROWS 15 50
WINCOLS 60 77
WAITSCR
WINMAX
SHOW 12 "Found screen change in window. "
DELAY 2
SHOW 12 "Loading TESTEXC.SCR "
KEY <BKSP>
KEY <SHF+F10>
TYPE "C:\EXC\TESTEXC.SCR"
KEY <ENTER>
WAITFOR "WAITSCR"
SHOW 12 "Highlighting rows 15 50 "
WINROWS 15 50
SHOWIN 79
DELAY 2
HIDEWIN
SHOW 12 "Highlighting rows 15 50, cols 60 77 "
WINCOLS 60 77
SHOWIN 79
DELAY 2
HIDEWIN
SHOW 12 "Now Testing WINMAX "
DELAY 1
WINMAX
SHOWIN 79
DELAY 2
HIDEWIN
SHOW 12 "Testing a LOOP using ON: 3 beeps "
:LOOP1
ON 3 ENDLOOP1
; BEEP
TICKS 7
GOTO LOOP1
:ENDLOOP1
SHOW 12 "Typing \qScroll Lock\q at col 14, row 8 "
CURSOR 14 8
KEY <DEL> 11
TYPE "Scroll Lock"
DELAY 1
SHOW 12 "Moving cursor back to top row. "
CURSOR 0 2
DELAY 1
SHOW 12 "Moving cursor back home. "
CURSOR 1 0
DELAY 1
SHOW 12 "Locating Scroll Lock and changing it back."
LOCATE "Scroll Lock"
TYPE "SCROLL LOCK"
KEY <DEL> 11
CURSOR 1 2
SHOW 12 "Testing /CASE/READ/LOOK IN A window. "
WINROWS 30 46
WINCOLS 16 36
SHOWIN 79
DELAY 2
HIDEWIN
CASE OFF
READ
LOOK "wordperfect"
CASE ON
IFY TLOC
GOTO RLERR
:TLOC
SHOW 12 "Test LOCATE in a window beyond line 25. "
LOCATE "WordPerfect"
TYPE "WORDPERFECT"
KEY <DEL> 11
CURSOR 1 2
GOTO TSTTO
:RLERR
SHOW 12 "Error in CASE/READ/LOOK. "
BEEP
BEEP
BEEP
DELAY 3
:TSTTO
SHOW 12 "Testing a 4 second timeout. "
SETWAIT 4
; BEEP
TIMEOUT TSTTF
WAITFOR "ZzZz"
:TSTTF
; BEEP
KEY <PGDN> 4
KEY <ENTER>
TYPFILE TESTEXC.TXT
KEY <ENTER> 2
TYPFILE TESTEXC.TXT <SPACE>
KEY <ENTER> 2
TYPFILE TESTEXC.TXT <ENTER>
; BEEP
SHOW 140 "Paused - Press Scroll Lock "
PAUSE
SHOW 12 "Done, exiting WordPerfect "
DELAY 2
KEY <F7>
TYPE "NY"
CLEAR