Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7045 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi all,

How can I protect against someone canceling a print and getting stuck in a layout in preview mode. Let me explain.

I have a print script. The print dialog box comes up so the user can check the document about to be printed and choose a printer.

If the user hits cancel, a dialog box appears saying "Print has been canceled. do you wish to continue with this script". Well, if the user hits cancel (for whatever unknown reason) they are now stuck in the print layout in preview mode. This does not seem to have an error code attached to it, because I have tried error capture on and no luck. So how can I protect againstv this happening?

Thanks

Posted

I set it first thing. Could I perhaps not have the proper error number. In FM help it said that error "1" is "User canceled action" is this correct?

Posted

It may be. I would not try to capture the error at all, though, if it is not necessary. Just use

Set Error Capture [On]

Print Setup [Restore; No dialog]

Print [ ]

Go to Layout [whatever]

The error dialog will be squelched.

Posted

Yep that worked. I was too busy with the script debugger, waiting for it to capture it that I never let the script finish to see that it actually worked. Duh!

Thanks Queue

This topic is 7045 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.