;Sends virtual keys to NOTEPAD.EXE           v1.0

;*****************************************************************************
;* Written by:  Symantec ASPECT Assist                                       *
;*                                                                           *                                                                             
;* This script file will give the user the option of either capturing data   *
;* in half hour increments, or in 24 hour increments. The Capture file will  *
;* close after a predefined period of inactivity on the port.                *
;*                                                                           *
;* This ASPECT script is intended only as a sample of ASPECT programming.    *
;* Symantec makes no warranty of any kind, express or implied, including     *
;* without limitation, any warranties of merchantability and/or fitness      *
;* for a particular purpose.  Use of this program is at your own risk.       *
;*                                                                           *
;* Technical Support is not provided on this script.                         *                                                                          *
;*****************************************************************************


;*****************************************************************************
;*                                                                           *
;* MAIN                                                                      *
;* The Main procedure uses sendkeystr, sendvkey and sendkey commands to open,*
;* type and save a file in NOTEPAD.EXE.  In order to successfully run this   *
;* this script more than once, the user must either delete TEST.TXT from the *
;* /Program Files/Procomm Plus/aspect folder or click on yes to overwrite the*
;* file that is created with this script runs.                               *
;*                                                                           *
;* Calls: none                                                               *
;* Modifies globals: ProgWinNum                                              *
;*                                                                           *
;*****************************************************************************
proc main
integer ProgWinNum = 0 

   pause 3 
   run "NOTEPAD.EXE" ProgWinNum         ;run notepad and get the window number
   pause 2 
   sendkeystr "This is ghost writer."   ;send a string to notepad
   sendvkey 0x0D                        ;send Enter
   sendvkey 0x0D                        ;send Enter
   pause 1 
   sendkeystr "This is a test."         ;send a string to notepad
   sendvkey 0x0D                        ;send Enter
   sendvkey 0x0D                        ;send Enter
   sendkeystr "Pretty good, hunh????"   ;send a string to notepad
   sendvkey 0x0D                        ;send Enter
   pause 2 
   sendkey ALT 'F'                      ;open file menu in notepad
   pause 2 
   sendkey 'S'                          ;send S for save
   pause 2 
   sendkeystr "Test"                    ;send string to name file
   pause 3 
   sendvkey 0x0D                        ;send enter to accept 
   pause 5                              ;pause (This pause should be long
                                        ;enough to allow the user to click
                                        ;on yes for file replacement)
   sendkey ALT 'F'                      ;open file menu
   pause 3 
   sendkey 'X'                          ;send X for exit
   
endproc
