SYS(13) - Printer Status

Returns the status of the printer. Included for backward compatibility.

SYS(13)

Return Value

Character value. For versions of Visual FoxPro running on Windows, SYS(13) always returns READY.

In prior versions, if the printer is not ready, SYS(13) returns OFFLINE. If the printer is ready, SYS(13) returns READY. SYS(13) can also return the following values under the specified conditions:

  • If the printer is connected to a COM port and if the printer returns Clear To Send Data or Data Set Ready, SYS(13) returns READY.

  • If the printer is connected to a parallel port and if the printer returns Out of Paper, I/O Error, Time Out, Printer Busy, or Printer Not Selected, SYS(13) returns OFFLINE.

Example

IF SYS(13) = 'OFFLINE'
   WAIT WINDOW 'Printer is offline'
ENDIF

See Also

Reference

SYS( ) Functions Overview
PRINTSTATUS( ) Function
SET PRINTER Command