I need to export some data from a FMP file.
As far as I can see, Applescript cannot export data, but the built in FMP Scripting can.
So I need to tell AppleScript to run a FMP Script, and this works fine.
However, my problem is that the FMP script I need is not present in the FMP Databases I need to process.
So I would create a new DB, save my FMP scripts into it and then “fetch” the FMP script through AppleScript from this “container” DB, and execute it on another FMP DB file.
Thanks for your reply.
I’m aware that I can get data from FMP DB, put it into variable and then write it out, but this means I have to read cell by cell and this is probably very slow, export from FMP is much quicker, but if not possible to do it using AppleScript then it is of no use, unless I overlooked something.
I’m also aware that one can import a FMP Script from one FMP FB into another, but AFAIK not using AppleScript, so again, I cannot automate the process.
If I misunderstood something, I would appreciate your further clarification.
I don’t think it would necessarily be that slow. You can put all the values in a specific cell of a found set into a single variable, for example, by using “field” instead of “cell” (results in a list of all the cell values).
Without knowing exactly why you have structured your workflow as you have, it’s hard to say what’s do-able. If all the databases you need to process are each unique, automation opportunities may be limited. If you’re dealing with millions of records, the time spent importing the export scripts may be worth it.
Thanks, I guess I have to try it and see how it behaves. I will first try to handle this through UI scripting and it that fails then I will try to manipulate the records.
Yes, calling a local script works, but the situation is like this: I have many databases which I have to export, but these do not contain the export script. So I would need to open each by hand and paste the script into it, save it and then I could call it from applescript. But this requires a lot of manual work.
So what I wanted to do is to create one new DB which contains the script and then open one of the old DBs and either run the script which is in the other, new DB, or import it into the old DB and run it there…
At the moment I’m playing with UI scripting and there is hope