Newbies RHlab Posted January 19, 2005 Newbies Posted January 19, 2005 Hello I am making a relatively small database and thus am storing files (not as references) in a container field. I want to view these files but the only way I have found to view them is to export the data. Is there any other way to do this? Is there a way to write a script that I can attach to a button that will automatically launch the program the file was made in and open it? Thanks for any help
ZuperZZ Posted January 20, 2005 Posted January 20, 2005 The only way I found to do that is inserting the files as "objects" -(right click on a container field), then a list of file types is presented -choose one and click on "Create from a File" (Im not sure about the translantion, anyway is the second option at the left ) -browse for the file you want -theres a option you can check... "vinculate"???, when you edit the file outside it will show the changes in FM. Maybe theres another way, but this will work ZuperZZ
Newbies RHlab Posted January 21, 2005 Author Newbies Posted January 21, 2005 I tried that but it seems to only work on a windows machine and I am using a Mac...Do you have any other ideas? thanks
Fenton Posted January 21, 2005 Posted January 21, 2005 We don't have the "Insert Object" on Macs. It's a Microsoft technology. You can use AppleScript to get more or less the same effect. This is an example file created to export pictures, but it works the same for files. ExportPictureOpen.zip
Newbies RHlab Posted January 26, 2005 Author Newbies Posted January 26, 2005 Could you elaborate more on this? I am not familiar with applescript at all and don't know where to start looking for / writing a script that will automatically open a file not stored as a reference in the db.
Fenton Posted January 26, 2005 Posted January 26, 2005 I'm not sure exactly what question is; the example file does what you're asking. AppleScript can just tell the Finder to open the file. The Finder opens it with the program which created it, if it can tell who that is (if the file has a creator code) and you have the program, or with the program which is mapped to open files with that extension (like a PC); or it asks you to find a program (filtered by the file type, if present). The Finder is pretty darn smart; many files however do not have the Mac creator code, so will open in the default for the extension. But FileMaker has to Export Field Contents first, or else there is no file to open. The techniques involved are mostly about "where exactly is the file?", because nothing can open a file if they don't know where it is. AppleScript cannot get the file from inside the container field itself (or I don't know how); it can get images out (with help), but not files; not yet anyway. Where the file is to start with is wherever FileMaker exported it to, which is hard-coded in the Export Field Contents File Reference dialog.
Recommended Posts
This topic is 7337 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