SaveAs Method (ALog)

Saves the log to the given location (URL).

Syntax

enSaveLog = Object.SaveAs ( sURL, [bAppend] )

The SaveAs method syntax has the following parts:

 

Name

Type

Description

enSaveLog

enumALogSave

Return the status of the save operation

Object

ALog

ALog control

sURL

Val BString

The URL or file name where the contents of the control will be saved.

bAppend

Val Bool

When True the function will append the log window contents to the specified file. Default value is False - overwrite the file contents.

Where

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 ALog control is not in ready state

Comments

If the sUrl parameter is omitted, the Save As dialog box will appear asking the user to select a file name and file type.

The saved file format is determined by the following rules:

If the sURL is given without a directory, the file is saved to the application current directory.

Example

The following example will save the contents of the ALog control to the file c:\testalpha\test1.txt:

if log1.SaveAs("c:\\testalpha\\test1.txt")=alogSaveFailed

MsgBox("Error saving Log File")

endif

Applies to

ALog

See Also

PlainText, ReadyState, Save, SaveLog