Newbies Guy_G Posted June 5, 2009 Newbies Posted June 5, 2009 I have a script that will take each record and save it as its own PDF (with a unique name) I cant seem to figure out how to allow the user to decide on the file path. Currently the path is defined in the script itself, but I need to be able to decide each time where to save the files. Also is there a way to get the script to notify me before it overwrites a file (ex, Overwrite? Yes / No / No to All / Yes to All) Heres what I have so far: -Show Custom Dialog Box ["Export to Separate PDF's; Press Ok to continue or press cancel] -If [Get (LastMessageChoice) = 1] Beep Set Variable [$counter; Value:0] Loop Set Variable [$path; Value; "file:exports/scripts & Get(record number) & ".pdf" Save Records as PDF[Restore; No Dialog; "$path"; Current record] Set Variable [ $Totalcount: Value:$counter +1] End Loop Show Custom Dialog ["Confirmation"; $TotalCount & "files have been created" Else Exit Script End if
bcooney Posted June 7, 2009 Posted June 7, 2009 (edited) Unfortunately you can't let the user pick the path, but script the filename. You can always save the PDFs to Get (DesktopPath), and let the users file the PDF where ever they want. You can check to see if the file is there first, by importing it into a temp global container. If it succeeds, (Get (lasterror) = 0, then the file is there, otherwise it is not. You could then throw a dialog and let the user decide what to do. Your script needs modification. To create a PDF for each record you would: Set $exportPath to a path Go to first record Set variable $Counter = 0 Loop Save as PDF (current record), $exportPath set variable $counter = $counter +1 Go to Next [Exit after Last] End Loop Edited June 7, 2009 by Guest
mr_vodka Posted June 8, 2009 Posted June 8, 2009 I would take a look at this plug-in ( generously provided by Dempsey ) for free. http://mooplug.com/features
Recommended Posts
This topic is 5648 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