home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / d / d009_2 / 1.ddi / SAMPLES / DOCS / SPECKEYS.MS$ / SPECKEYS.bin
Encoding:
Text File  |  1992-02-03  |  1.9 KB  |  68 lines

  1. '*********************** SPECKEYS.MST ************************************
  2. 'Demonstrates:  Sending special keys to the active window.  This program
  3. '               assumes CAPS LOCK is OFF before the program begins.
  4. '
  5. 'Required Files: FASTTEST.INC, NOTEPAD.EXE
  6. '
  7. 'Uses: FASTTEST
  8. '
  9. 'Complexity Level: INTRODUCTORY
  10. '
  11. 'Notes:
  12. '
  13. '*************************************************************************
  14.  
  15. '$INCLUDE 'FASTTEST.INC'      '*** Include all necessary files.
  16. XSetLogOptions LOG_SCREEN     '*** Output any errors to the viewport.
  17. XStartApp "notepad.exe", ""   '***Start Notepad
  18.  
  19. '***Enter two lines of lowercase text into Notepad:
  20.  
  21. XEnter "line 1 - this line of text consists of lowercase characters"
  22. XEnter "line 2 - this line of text consists of lowercase characters"
  23.  
  24. '***Set Caps Lock ON so that the next line of text will be uppercase:
  25.  
  26. XKey "CAPSLOCK"
  27. XEnter "line 3 - this line of text consists of uppercase characters"
  28. XKey "CAPSLOCK"  '***Toggle Caps Lock OFF
  29.  
  30. '***Move the cursor to the top of the file by pressing Ctrl+Home:
  31.  
  32. XCtrl "HOME"
  33. XShift "END"     '***Select the entire first line of text with Shift+END
  34.  
  35. '*** Press Alt+E+T to cut the selected line to the Windows Clipboard.
  36.  
  37. XAlt "E"
  38. XKey "T"
  39.  
  40. '*** Press the DELETE key to delete the first line, which is now blank:
  41.  
  42. XKey "DELETE"
  43. XKey "DOWN 1"    '***Move to the beginning of the second line
  44.  
  45. '***Paste text at the beginning of the second line, then press ENTER
  46.  
  47. XAlt "E"
  48. XKey "P"
  49. XKey "ENTER"
  50.  
  51. XCtrl "HOME"        '***Return to the top of the file
  52. XKey "RIGHT 6"      '***Move the cursor right six spaces in line 1
  53. XKey "BACKSPACE"    '***Press BACKSPACE to delete the old line number.
  54. XKey "1"            '***Renumber the line to line 1.
  55.  
  56. '*** Proceed down the file and renumber the remaining two lines:
  57.  
  58. XKey "DOWN"
  59. XKey "BACKSPACE"
  60. XKey "2"
  61.  
  62. XKey "DOWN"
  63. XKey "BACKSPACE"
  64. XKey "3"
  65.  
  66. END
  67.  
  68.