home *** CD-ROM | disk | FTP | other *** search
- '*********************** SPECKEYS.MST ************************************
- 'Demonstrates: Sending special keys to the active window. This program
- ' assumes CAPS LOCK is OFF before the program begins.
- '
- 'Required Files: FASTTEST.INC, NOTEPAD.EXE
- '
- 'Uses: FASTTEST
- '
- 'Complexity Level: INTRODUCTORY
- '
- 'Notes:
- '
- '*************************************************************************
-
- '$INCLUDE 'FASTTEST.INC' '*** Include all necessary files.
- XSetLogOptions LOG_SCREEN '*** Output any errors to the viewport.
- XStartApp "notepad.exe", "" '***Start Notepad
-
- '***Enter two lines of lowercase text into Notepad:
-
- XEnter "line 1 - this line of text consists of lowercase characters"
- XEnter "line 2 - this line of text consists of lowercase characters"
-
- '***Set Caps Lock ON so that the next line of text will be uppercase:
-
- XKey "CAPSLOCK"
- XEnter "line 3 - this line of text consists of uppercase characters"
- XKey "CAPSLOCK" '***Toggle Caps Lock OFF
-
- '***Move the cursor to the top of the file by pressing Ctrl+Home:
-
- XCtrl "HOME"
- XShift "END" '***Select the entire first line of text with Shift+END
-
- '*** Press Alt+E+T to cut the selected line to the Windows Clipboard.
-
- XAlt "E"
- XKey "T"
-
- '*** Press the DELETE key to delete the first line, which is now blank:
-
- XKey "DELETE"
- XKey "DOWN 1" '***Move to the beginning of the second line
-
- '***Paste text at the beginning of the second line, then press ENTER
-
- XAlt "E"
- XKey "P"
- XKey "ENTER"
-
- XCtrl "HOME" '***Return to the top of the file
- XKey "RIGHT 6" '***Move the cursor right six spaces in line 1
- XKey "BACKSPACE" '***Press BACKSPACE to delete the old line number.
- XKey "1" '***Renumber the line to line 1.
-
- '*** Proceed down the file and renumber the remaining two lines:
-
- XKey "DOWN"
- XKey "BACKSPACE"
- XKey "2"
-
- XKey "DOWN"
- XKey "BACKSPACE"
- XKey "3"
-
- END
-
-