Save Method (ALog)

Saves the log to the current location URL.

Syntax

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.

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

Comments

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:

Example

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

Applies to

ALog

See Also

LocationURL, PlainText, ReadyState, SaveAs, SaveLog