You did not say what version of FM you are using, however.
First do not give user the Option of Continue/Cancel by the Status
bar.
Set "Allow User Abort": to [Off] at the beginning of the script.
& may I suggest using the "New Window" Script step.
With that, then:
Adjust script to Use:
New Window (Name & Size as Required)
then
Print Setup [(Restore, No dialog])
Sort(Restore)
Go to Layout ("Summary Report A")
Select Window [Named or Current]
Enter Preview Mode []
Adjust Window [Resize to Fit]
Enter Preview Mode [Pause]
#
Additional Script steps as required
#
Set a Close Window [Named or
Current]
This should drop you back
into your current layout & Found set.
Note: If going to a foreign TO a GtRR may be required.
There are other tweaks that can be integrated
HTH
Dave
On May 31, 2010, at 12:57 PM, Nicholas Geti wrote:
If I cancel a print job using the
"Continue/Cancel" options in the left "Status Area" panel, none of the
script statement after "Print" execute. I would like to
restore the previous layout.
Here is the script:
Go to Layout ("Summary Report A")
Sort(Restore)
Set Error Capture [ON]
Print Setup [(Restore, No dialog])
Enter Preview Mode [Pause]
Print[]
#If the user cancels the print, the script
never gets here. I suspect the cancel has
#Exited the script. The program stays in Layout
"Summary Report A".
Go to Layout ["Full List
View"]
Enter Browse Mode[]
Dave Rawcliffe
RLW Concepts
phn: 925 292 1940
Skype: daverawcliffe
Member, FileMaker Business
Alliance