if [ get(lasterror) = 1 ]
// User cancelled, do something else
//Otherwise continue as planned.
also, make sure before your print dialog to use the script step:
Set Error Capture [ on ]
Set Error Capture [On]
Go to Layout ["Report Layout"]
go to layout ["Main"]
go to layout["Main"]
show custome Dialog ["Printing Canceled"; "Printing Aborted by User."]
Is it possible that the printing script uses Halt Script if the user cancels, instead of Exit Script? If Halt Script is used it will cancel all scripts that are running, whereas Exit Script will cancel only the balance of its own script, and thus return to the calling script.