Jump to content
Server Maintenance This Week. ×

Open File Trigger FileMaker Script


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

Recommended Posts

Here is what i would like to happen.

User Clicks on a File say FileName.ext

The opening of the file FileName.ext triggers to opening of MyDatabase.fp7 and runs a ScriptMaker Script (The same one every time) and the ScriptParameter of that script is the file path of the file that was opened. (so i the file can import it).

Ideally i would love to do this on both platforms but OS X is primary. Have no idea if is really possible.

Is an Apple script App the way to go?

Any thoughts on any part are welcome

Thanks

Link to comment
Share on other sites

Is there an "import from folder" feature? If so, drop the import file into the folder, the folder opens the database that imports the file from the folder.

Link to comment
Share on other sites

On a Mac, AppleScript has "Folder Actions", which means you can attach a particular AppleScript (with a folder action syntax command at the beginning) to a folder. It can then process a file (or files) dropped in it. It is best to move the files out of the folder (not to a subfolder within), to avoid a recursive processing loop.

There have been instances where folder actions somehow become detached from their folder however. The modern method is a bit more intensive and geeky, using "launchd", which is part of the Mac OS. It has more features than folder actions, and is more reliable, but requires a fair amount of setup (with not much interface); more than I have done ;)-]

Another method would be just an AppleScript droplet. Which you can drop files/folders on. This is fairly simple, but requires that it be there to drop onto.

A third method would be to run an "on idle" AppleScript in the background, looking at a folder. It does nothing (and uses almost no CPU) for an interval, then checks the folder for files, then waits and tries again, forever (until quit). But unless the interval is very short, there would be a gap before anything happened.

A cross-platform but more expensive method would be Troi's File plug-in, which can define either a space (container field) or an entire FileMaker layout as a "drop space", then process the dropped file. This is different from what you asked, but seems the best way to tie a dropped file to a particular FileMaker record.

There may be other (cheaper) plug-ins which can do this; but I have not heard.

Link to comment
Share on other sites

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