home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
UTILS1
/
EXC32.ZIP
/
TESTEXC.SCR
< prev
next >
Wrap
Text File
|
1993-12-03
|
4KB
|
206 lines
; This script is used to test EXC.EXE functionality. It is run against
; the Mirosoft EDIT editor that comes with DOS 5 and up. It uses almost
; every command available in EXC. To test the abort and pause/resume keys,
; type LEFT SHIFT+RIGHT SHIFT (abort) or SCROLL LOCK (pause/resume toggle)
; whenever you wish. Requires VGA.
; If you don't have DOS 5 or greater, feel free to modify it to work with
; your favorite editor or word processor. This could be a very good
; excercise in learning how scripts are coded and how they work.
; 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.
; The initial delay should be increased for very slow CPUs. Some commands
; may not function properly at speeds below 8 mhz. Uncommenting the SLOW
; command may help.
; SLOW
SCRMAX 80 50
DELAY 5
WAITFOR "Guide"
CASE ON
WINMAX
WAITFOR "dialog box"
CASE OFF
KEY <ESC>
SHOWAT 17 47
:LOOP
SEARCH "00001:001"
IFN LOOP
SHOW 12 "Found \q00001:001\q "
CASE ON
DELAY 2
BEEP
SHOW 14 "Testing WAITSCR in window - Press space bar."
WINROWS 15 50
WINCOLS 60 79
WAITSCR
WINMAX
SHOW 12 "Found screen change in window. "
DELAY 2
:LOAD
SHOW 12 "Loading TESTEXC.SCR "
KEY <BKSP>
KEY <ALT+F>
WAITFOR "Open"
TYPE "o"
WAITFOR "File Name:"
TYPE "M:\EXC\TESTEXC.SCR"
KEY <ENTER>
WAITFOR "Save it now?"
TYPE "n"
WAITFOR "WINROWS"
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 43, row 6 "
CURSOR 43 6
KEY <DEL> 11
TYPE "Scroll Lock"
DELAY 1
SHOW 12 "Moving cursor back to top row. "
CURSOR 0 3
DELAY 1
SHOW 12 "Moving cursor back home. "
CURSOR 2 0
DELAY 1
SHOW 12 "Locating Scroll Lock and changing it back."
LOCATE "Scroll Lock"
TYPE "SCROLL LOCK"
KEY <DEL> 11
CURSOR 2 3
KEY <DOWN> 50
KEY <PGDN>
KEY <PGUP>
SHOW 12 "Testing /CASE/READ/LOOK IN A window. "
WINROWS 30 49
WINCOLS 16 36
SHOWIN 79
DELAY 2
HIDEWIN
CASE OFF
READ
LOOK "waitscr"
CASE ON
IFY TLOC
GOTO RLERR
:TLOC
SHOW 12 "Test LOCATE in a window beyond line 25. "
LOCATE "WAITSCR"
TYPE "WaitScr"
KEY <DEL> 7
; CURSOR 2 3
GOTO TSTTO
:RLERR
SHOW 12 "Error in CASE/READ/LOOK. "
BEEP
BEEP
BEEP
DELAY 3
:TSTTO
WINMAX
SHOW 12 "Testing a 4 second timeout. "
SETWAIT 4
BEEP
TIMEOUT TSTTF
WAITFOR "ZzZz"
:TSTTF
BEEP
SHOW 12 "Going to end of the file. "
KEY <CTL+END>
DELAY 1
SHOW 12 "Inserting TESTEXC.TXT using SLOW "
DELAY 1
SLOW
TYPFILE TESTEXC.TXT <ENTER>
SHOW 12 "Inserting TESTEXC.TXT using FAST "
DELAY 1
FAST
TYPFILE TESTEXC.TXT <ENTER>
DELAY 1
BEEP
SHOW 12 "Testing use of variables, COMSPEC & 16 "
DELAY 2
SET 16 "%COMSPEC%"
TYPE "[@16@]"
KEY <ENTER>
SET 16 NULL
TYPE "[@16@]"
KEY <ENTER>
SHOW 12 "TESTING 3 subroutine executions. "
SET 2 1
SET 1 DO2
GOTO SUB1
:DO2
SET 2 2
SET 1 DO3
GOTO SUB1
:DO3
SET 2 3
SET 1 ENDSUBS
GOTO SUB1
:ENDSUBS
SHOW 14 "Paused - Press Scroll Lock "
PAUSE
:EXIT
SHOW 12 "Done, exiting Microsoft Editor "
DELAY 1
KEY <ALT+F>
WAITFOR "Exit"
TYPE "x"
WAITFOR "Save it now?"
TYPE "n"
QUIT
:SUB1
TYPE "Subroutine execution number @2@."
KEY <ENTER>
GOTO @1@