Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7231 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi Everyone,

I am sorry, I know this has been asked a buch of times but I still can't get it to work.

I would like to save PDF files in a FM database and be able to open them using their origanal program! I know how to do it by just saving a reference to the file, but not by saving the entire file.

Would it be possible to move a copy of the files, via applescript, into one folder (associated to the database) during the import. That way I could one folder that contains all the PDFs and I could be sure not to move it or delete any files.

I am using FMP7 and OS 10.3.8.

Thank you very much for your help

Sebastian

Posted

Okay,

I think I solved my own problem.

I took an applescript writen by Frenton and changed it a little bit. It now loads the entire file into a container field and if I ever want to open it in its original app, it exports the file into a DATA folder associated with the DB. Plus it also checks to make sure I don't export the file twice.

I would still appreciate any ideas on how to improve this File. I have never applescripted anything so... we'll see.

Thanks

Sebastian

PDFArchiv.zip

Posted

That's a clever idea, to use FileMaker's error checking. But it always gets an error, 'cause you put the serial number field in that AppleScript, instead of the Name field, like you did in the 2nd AppleScript.

Another little cleanup, you don't need the Export.pdf path line in the 1st AppleScript, as it's only opening the file if it exists.

Posted

Hi Fenton,

I am sorry about the file checking skript, I attached an older file, I already had that fixed.

Which lines can I delete in the 1st AppleScript? I don't know how to tell Appleskript to get a filename from FileMaker and then open that file in the finder.

Thank you very much for your help, I really appreciate it!!!

Sebastian

Posted

This is the 1st AppleScript, which tries to open the file. No "Export.pdf" line needed, 'cause it doesn't do anything with the export file in that 1st script.

tell current record of window 1

set myFolder to cell "myFolder"

set newName to cell "Name"

set newFolder to myFolder & "DATA:"

end tell

tell application "Finder"

set newFile to newFolder & newName

open file newFile

end tell

You do know how to open the file in the Finder. You just did it above, with the "open" command. That's all there is to it.

This topic is 7231 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.