FilePrint Procedure

Prints a text file using the currently selected printer.

Syntax

[ bStatus = ] FilePrint ( sFileName )

The FilePrint procedure syntax has the following parts:

 

Name

Type

Description

bStatus

Bool

Status, True for success and False for failure

sFileName

Val BString

Name of the file to print

Comments

If a printer was not selected from Print Setup, ATEasy uses the Windows default printer (the default printer can be selected from Windows Control Panel application). The procedure returns -1 if it failed to print or 0 if it printed successfully.

Example

The following example prints the file “x.log” from the Log Directory:

if FilePrint(GetDir(aGetDirLog)+"\\x.Log") = False then

print "An error occurred printing the Log file:", s

endif

See Also

GetDir, PrintLog, SaveLog