Print

Instructs the application responsible for a file to print the file on the default printer.

Syntax:

Print (data file, directory, display mode, reserved)

Parameters:

(s) data file  the name of the file to print.

(s) directory  current working directory (if applicable).

(i) display mode @NORMAL, @ICON, @ZOOMED, @HIDDEN.

(i) reserved reserved.

Returns:

(i)  @TRUE if the function completed
@FALSE
if error occurred.

 

Instructs the application responsible for a file to print the file on the default printer. The Windows ShellExecute API is used. It examines the extension of the data file, looks the extension up in the Windows registry to determine the owning application, starts the owning application, and instructs it, also according to data specified in the registry, to print the data file. Most applications will send the printout to the default printer, however the exact action taken by the application is under the application’s own control.

Applications that support this command or their setup programs will generally make the necessary modifications to the Windows registry to allow this function to perform successfully.

 

Example:


FileCopy("C:\config.sys", "xxx.txt", 0)
a=Print("xxx.txt", DirGet( ), @NORMAL, 0)

TimeDelay(2) ; Give the application enough time to print before deleting the file FileDelete("xxx.txt")
See Also:

RunShell