ONPRINT

From iMacros

Jump to: navigation, search

Handles print dialogs. The ONPRINT command must appear before the PRINT command which triggers the printer dialog to come up.

Contents

Syntax

ONPRINT P=n

With V6.10 or later you have the option to cancel the Print dialog

ONPRINT P=n BUTTON=(PRINT|CANCEL)

Parameters

  • P
    Specifies the number of the printer to use in the drop down list. If you use only P= or P=* the most recently selected printer is used. Typically this is the default windows printer.
  • Button
    Specifies the button on the Print dialog. By default the PRINT button is selected. With CANCEL the dialog is canceled and no page is printed.

Examples

Select the third printer in the list and print the page:

URL GOTO=http://www.iopus.com 
ONPRINT P=3 
PRINT

Cancel a Print dialog that appears:

 ONPRINT P=* BUTTON=CANCEL
 URL GOTO=javascript:print()

See Also

PRINT