June 13, 200520 yr When running a script that goes into Preview mode and pauses, Filemaker offers two options in the status area: to Continue or Cancel. Is there any way to capture the Cancel in the same way as you might with the Cancel in a Message choice and Status(CurrentMessageChoice) function? What I would like to do is have the script take the user back to the original layout if the Cancel button is pressed rather than dumping him or her on the layout in question. Hopefully, the user won't even think of using the cancel button but.... I would guess, unfortunately, that the Cancel button just runs the Halt Script step, and there is no way of getting around that, but maybe not? Jake Sterling
June 13, 200520 yr If you add an Allow User Abort [Off] step to the beginning of your script, the Cancel button will not exist. You can then incorporate your own Cancel dialog.
June 15, 200520 yr Assuming that you are putting the user into Preview mode prior to actually printing it, here is a quick script: Allow User Abort [off] Set Error Capture [on] Go to Layout [MyPrintLayout] Print Setup [no dialog] Enter Preview mode [pause]{could be indefinite or a set amount of time} Print [] {with dialog} Enter Browse mode Go to Layout [original] If the user clicks the cancel button on the print dialog box, they will still be taken back to the original layout. Whatever the user does, they are taken back to the original layout.
Create an account or sign in to comment