Testing for Print Cancel

I’m noting (from Help) that info(“dialog trigger”) will not work on standard system dialogs.

Is there another straight forward way to check whether the user has cancelled a Print (print dialog) job? (If they’ve cancelled, I need to clear some fields.)

I’m afraid not. I don’t even know how to do that in Objective-C, and a google search turns up nothing. I’m not sure that Apple provides any method to access the results of this dialog.

Perhaps you could use the printtopdf command instead. If you use the “printer” option, it will print directly to the printer with no dialog, so no opportunity to cancel.