;Open Capture File in any path ;***************************************************************************** ;* * ;* ANYCAP.WAS * ;* Copyright (C) 1994 DATASTORM Technologies, Inc. * ;* All rights reserved. * ;* * ;* Written by: Larry Dorman * ;* * ;* This script file allows the user to enter a complete path and filename * ;* for opening a capture file. This eliminates the need to adjust the * ;* capture path if it is necessary to capture to different directories. * ;* * ;* This ASPECT SCRIPT is intended only as a sample of ASPECT programming. * ;* DATASTORM 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. * ;* * ;***************************************************************************** proc Main string Title ;Dialog title string Prompt ;Dialog prompt string UserInput ;User input string CapPath ;Capture path string CapName ;Capture file name integer Count ;Character count integer Loop = 0 ;Loop counter integer Done = 0 ;Finished flag Title = "Open Capture File" ;Title text Prompt = "Please Specify a Path and Name" ;Prompt text fetch capture path UserInput ;Get current capture path sdlginput Title Prompt UserInput DEFAULT ;Query user for path/file strsearch UserInput "\" Count ;Count number of \'s while !Done ;Loop until done strextract CapName UserInput "\" Loop ;Extrat data before '\' if Loop != Count ;Are we to the end? strfmt CapPath "%s%s\" CapPath CapName ;No, append to path else ;Yes... Done = 1 ;Flag as finished endif Loop ++ ;Increment loop counter endwhile 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 endproc