Format.FlushLog Function

關閉描述

Forces all information that has accumulated for the print job to be written to a log immediately without waiting for the print job to end.

關閉語法

Format.FlushLog

關閉備註

The Format.FlushLog function can be used to force an update of the log file before a print job is complete.This can be useful when print jobs are cancelled before completion.The following example demonstrates the Format.FlushLog function in use.The code, used as an event control script assigned to the OnIdenticalCopies event, prompts users to enter a package weight for each (otherwise identical) label.When the last package has been processed, they enter "x" to the prompt.The log is then written and the print job is cancelled.

weight = InputBox("Press Button on Scale to enter Weight","Box Weight")

If LCase(weight) = "x" Then

Format.FlushLog

Format.CancelPrinting("Remainder of Print Job is being cancelled")

EndIf