I'm trying to add an incremental number to the file I'm saving in the Output_Multiple function because I have the same file running through
multiple outputs with the same file extention. I already have the integer x for the file loop, but don't know how to implement that into the sFile variable
to add the number when saving the file. The data1.dat file is feeding sOutdir and sOutExt.
Any help is appreciated.
Output_Multiple(string sOutput, string sOutDir, string sFile, string sOutExt) //string sExt,
CAD.SpecifyOutputName.OK.Click()
CAD.Output.OK.Click()
CAD.Output.SaveAs.TextField.SetText(sOutDir+ sFile + sOutExt )//sOutExt
CAD.Output.SaveAs.Save.Click()
testcase Output_Ard () appstate MyDefaultBaseState
do
string sTestDir = "BTest\Output_Ard\"
string sOutDir = sPath+"output.files\"+sVerNum+"\"+sTestDir
string sGoldDir = sPStart+sTestDir+"Gold\"
string sOutput
string sOutExt
string sFileName
// start script
list of FILEINFO lfFiles
lfFiles = SYS_GetDirContents(sPStart + sTestDir)
string sFile
int x
for x=1 to ListCount(lfFiles)
sFile = lfFiles[x].sName
string sExt
sExt = Right(sFile, 4)
if(sExt == ".ARD" || sExt == ".ard")
do
OpenDismissDialog(sPStart+sTestDir+sFile)
//recording
CAD.SetActive()
HFILE hfile
sFileName = (sPStart+sTestDir+"Data1.dat")
hfile = FileOpen (sFileName, FM_READ)
while (FileReadValue(hfile, sOutput))
FileReadValue(hfile,sOutExt)
//FileReadValue(hfile,sOutput)
Sleep(2)
Output_Multiple(sOutput, sOutDir, sFile, sOutExt) //run standard read from file
CloseFileDismissDialog()
except
WriteIncomplete("Error-Output of {sOutDir + sFile}.cf2 Output failed")