timalex Posted February 13, 2001 Posted February 13, 2001 Hi Does anyone know how I can conditionally print records? I mean, when the user is presented with the print dialog and presses the cancel button, how can my script handle this (e.g. EXIT SCRIPT)?
WBlanchard Posted February 13, 2001 Posted February 13, 2001 If you hit the cancel button on the Print dialog box while in a script, your script should drop down to the next step. Personally, I tried not to allow my users to cancel print job in a script. I use the no dialog option. What I do is to take them to a report review, and script a print option into the process. HTH [This message has been edited by WBlanchard (edited February 13, 2001).]
Vaughan Posted February 13, 2001 Posted February 13, 2001 Use the script step "Allow User Abort (Off)" this will let people cancel out of print dialogs but stops the goofy "Cancel-Continue Script?" dialog that usually pops up and confuses users.
timalex Posted February 14, 2001 Author Posted February 14, 2001 Thanks san Jose and Sydney. Unfortunately, hitting OK also drops down to the next step in my script. I have a routine that prints an invoice. After printing, the records are marked as printed, the reason being that reprints of the invoice have to be marked with COPY (by law). If the user decides not to print, the records still get marked. You may suggest adding a 'confirmation' routine, on the lines: "did the invoice print OK?", marking the records accordingly. However, the application prints to a print file, so the printing is 'asynchronous' anyway. I have a feeling I'm looking for an external function here, which, of course, I don't have. Any offers?
Chris Wood Posted February 15, 2001 Posted February 15, 2001 Have you tried using Error Capture (on) at the beginning of a pront script and (off) at the end. Then if the cancel button is pressed, it just closes the print funtion. Chris
timalex Posted February 15, 2001 Author Posted February 15, 2001 Chris How does my script know that the print has been cancelled?
BobWeaver Posted February 16, 2001 Posted February 16, 2001 Status(CurrentError)=1 indicates that the user cancelled the operation Status(CurrentError)=600 indicates a general print error Status(CurrentError)=603 indicates that the printer connection was lost. You can check for any of the 3 conditions to see if the print operation was unsuccessful. The error codes are listed in the Filemaker help file.
LiveOak Posted February 16, 2001 Posted February 16, 2001 Maybe I'm missing something, but why not ask the user if they want to print BEFORE calling the print step (with a Show Message script step)? Supress the print dialog completely. -bd
BobWeaver Posted February 16, 2001 Posted February 16, 2001 That's what I was wondering too. It was actually suggested somewhere near the top of this topic.
timalex Posted February 16, 2001 Author Posted February 16, 2001 Hi I will try out the status(currenterror). I think that's what I'm looking for - more interaction with the op system really. Thanks
Recommended Posts
This topic is 8686 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