;Open Capture File in any path               v1.10

;* 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.                         *                                                                          *
;*****************************************************************************


proc Main
   string Title                                 ;Dialog title
   string Box                                   ;Dialog prompt
   string UserInput                             ;User input
   string CapPath                               ;Capture path
   string CapName                               ;Capture file name
   Title = "Open Capture File"                  ;Title text
   Box = "Please Specify a Path and Name"       ;Prompt text
   fetch capture path UserInput                 ;Get current capture path
   sdlginput Title Box UserInput DEFAULT        ;Query user for path/file
      if FAILURE
         exit
      else               
         getfilename CapName UserInput          ;Get Capture File to Open
         getpathname CapPath UserInput          ;Get Capture Path to Open
   
         set capture path CapPath               ;Set capture path
         set capture file CapName               ;Set capture name
         set capture overwrite ON               ;Set to overwrite if existing
         set capture query OFF                  ;Don't ask for name again
         capture ON                             ;Open the capture file
      endif
endproc
