Dr. Evil Posted February 27, 2008 Posted February 27, 2008 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! :
comment Posted February 27, 2008 Posted February 27, 2008 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
Dr. Evil Posted February 27, 2008 Author Posted February 27, 2008 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?
comment Posted February 27, 2008 Posted February 27, 2008 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.
Dr. Evil Posted February 27, 2008 Author Posted February 27, 2008 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!
Recommended Posts
This topic is 6106 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 accountSign in
Already have an account? Sign in here.
Sign In Now