June 5, 200916 yr Newbies 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
June 7, 200916 yr 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, 200916 yr by Guest
June 8, 200916 yr I would take a look at this plug-in ( generously provided by Dempsey ) for free. http://mooplug.com/features
Create an account or sign in to comment