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

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

Recommended Posts

Posted

I would like to give user an option when printing. Script takes user to preview mode on report, at this time script is on pause. I have set Allow User to Abort to [On], so user can Continue or Cancel. If user choses “Continue” I would like script to move forward to Printing. If user choses “Cancel” I would like script to move forward with closing window and returning user to original layout.

I have set an “If” in my script after being paused for user to preview. “If” is roughly set to:

If [Get (LastMessageChoice) =”2”]

Exit script

Else

Print script

I can not get script to respond to either choices “Continue” or “Cancel”. Is the (Get (LastMessageChoice) the wrong method here?

Is there a better easier way to accomplish this?

My goal is to use the selection of Cancel or Continue that is already there.

I have attached a demo file with this all built in to help explain my question. I’m guessing there is a small step I’m missing and it is an easy fix.

THANK YOU all for your interest and help with my question!

:

Posted

Get (LastMessageChoice) returns the choice made in a custom dialog. The buttons Continue/Cancel you get when a script is paused have nothing to do with it. You can set Allow User to Abort to [Off], so the user must continue to:

Show Custom Dialog [ Message: "Would you like to print this?"; Buttons: “Print”, “Cancel” ]

If [ Get (LastMessageChoice) = 1 ]

# DO PRINT

Else

# GO BACK

End If

Posted

Oops, forgot to attach demo file. Anyways...

Is there anyway to use the Continue/Cancel buttons given when a script is paused? I can show a custom dialogue but it would not be as clean with the extra window and all.

Any suggestions?

Posted

I don't think so. When user hits Cancel on a paused script, the script is exited. The user is stuck on the previewed layout, and you have no control over what's going to happen next. To have such control, you need to have the script (or a script) running.

Posted

Just as well. I will give the user options at this point anyway. Print, Save As, Email and or Cancel.

Thank you for clearing up my options here!

This topic is 6113 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.