Fred777 Posted November 18, 2004 Posted November 18, 2004 - I have a button on a db. - When the button is clicked it opens a file (via a script). - The file relates to the record number (so if it is record #5 and you click the button a file called "5.pdf" is opened via the "open URL" script step) the question: Is there a way to check if the file exists? for example, if the file doesnt exist Id like to give the user a message ( "Show Custom Dialog") thanks!
Oldsneekers Posted November 18, 2004 Posted November 18, 2004 Just thinking on the fly... How about the script: Open file 5.pdf, If Current(file name) does not equal 5.pdf, Show custom dialog. End if. Good Luck.
transpower Posted November 18, 2004 Posted November 18, 2004 Trap the error in the script: Set Error Capture [On] Set Field [zc_ErrorCaptureField_g; Get (LastError)] #The field zc_ErrorCaptureField_g is a global text field If[zc_ErrorCaptureField_g <> 0] Show Custom Dialog ["Couldn't find the file..."] End If
Recommended Posts
This topic is 7313 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