Instance Method

handlePrint(_:)

Handles the print AppleScript command by attempting to print the contents of the window (or its associated document, if any).

Declaration

func handlePrint(_ command: NSScriptCommand) -> Any?

Discussion

If there is a corresponding document and the window is the main window of the document, it forwards the print command to the corresponding document; otherwise, the window sends itself a print message. This may have been handled differently in versions of macOS prior to version 10.3.

See Also

Handling Script Commands

func handleClose(NSCloseCommand) -> Any?

Handles the close AppleScript command by attempting to close the window (and its associated document, if any).

func handleSave(NSScriptCommand) -> Any?

Handles the save AppleScript command by attempting to save the window (and its associated document, if any).