Jump to content

Open a File


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

Recommended Posts

  • Newbies

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Newbies

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7023 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.