Saves the log to the current location URL.
enSaveLog = Object.Save( [bAppend] )
The Save method syntax has the following parts:
Name |
Type |
Description |
enSaveLog |
enumASaveLog |
Return the status of the save operation |
Object |
ALog |
ALog control |
bAppend |
Bool |
When True the function will append the log window content to the current file. Default value is False - overwrite the file content. |
enumALogSave can have one of the following values:
Name |
Value |
Description |
alogSaveOk |
0 * |
Successful save |
alogSaveCanceled |
1 |
User selected Cancel when prompt to provide a file name to select |
alogSaveFailed
|
2 |
Failed to save the file since ATEasy cannot create, open or save the specified file or the Log control is not in ready state |
If the current LocationURL is empty or the log is not in ready the function will return alogSaveFailed .
The saved file format is determined by the following rules:
If the current LocationURL has an filename extension of "txt", for example, mylog.txt, then the log will saved as text format, overriding the PlainText property.
If LocationURL has an extension of "htm", then the log will be saved as HTML format, overriding the PlainText property.
If sURL has an extension of "mht", then the log will be saved as Web Archive, Single .mht file format, overriding the PlainText property. (v7.0)
If any other filename extension is set for LocationURL, the log will be saved according to the format specified by the PlainText property.
The following example will save the contents of the ALog control:
! wait until ready
print "hello"
while log.ReadyState<>alogReadyStateComplete
endwhile
! save
if log.Save()=alogSaveFailed
MsgBox("Error saving Log File")
endif