Forum Discussion
ChrisH
15 years agoOccasional Contributor
I use the same method which Madhi has suggested:
JScript:
function GeneralEvents_OnStopTest(Sender)
{
var logFolder = "C:\\Logs\\";
var mhtName = "log.mht";
if (!aqFileSystem.Exists(logFolder))
{
aqFileSystem.CreateFolder(logFolder);
}
var currentdateTime = aqDateTime.Now();
var dateTimeFolder = aqDateTime.GetYear(currentdateTime) + "_"
+ aqDateTime.GetMonth(currentdateTime) + "_"
+ aqDateTime.GetDay(currentdateTime) + "_"
+ aqDateTime.GetHours(currentdateTime) + "_"
+ aqDateTime.GetMinutes(currentdateTime) + "_"
+ aqDateTime.GetSeconds(currentdateTime);
Log.SaveResultsAs(logFolder + dateTimeFolder + "\\" + mhtName, lsMHT);
}
(On a different note, how do you post code in a sensible block when you reply?)
JScript:
function GeneralEvents_OnStopTest(Sender)
{
var logFolder = "C:\\Logs\\";
var mhtName = "log.mht";
if (!aqFileSystem.Exists(logFolder))
{
aqFileSystem.CreateFolder(logFolder);
}
var currentdateTime = aqDateTime.Now();
var dateTimeFolder = aqDateTime.GetYear(currentdateTime) + "_"
+ aqDateTime.GetMonth(currentdateTime) + "_"
+ aqDateTime.GetDay(currentdateTime) + "_"
+ aqDateTime.GetHours(currentdateTime) + "_"
+ aqDateTime.GetMinutes(currentdateTime) + "_"
+ aqDateTime.GetSeconds(currentdateTime);
Log.SaveResultsAs(logFolder + dateTimeFolder + "\\" + mhtName, lsMHT);
}
(On a different note, how do you post code in a sensible block when you reply?)
Related Content
- 2 years ago
- 11 months ago
Recent Discussions
- 2 days ago