Jump to content
Sign in to follow this  
SteveB

Recover Command Applescript

Recommended Posts

You are much better off using a backup file. That ****ing Recover Command will give you a corrupted file fairly frequently. The FM manual even mentions this!

Share this post


Link to post
Share on other sites

Does anyone know of an Appscript command/syntax to tell FMP to execute the Recover command. I've published FMP DBs on the Web for years but always had to use a workaround for corrupted DBs such as copying the most recent backup to the current folder.

Share this post


Link to post
Share on other sites

If you are distributing run-time files, you should be able to use a scripting addition to simulate the modifier key your need to have pressed while opening the file.

Share this post


Link to post
Share on other sites

I agree with Steve, you really shouldn't be relying on the recover command to fix files. A backup is better. Having said that, if you still want to do this, the only way to run the recover command from applescript is to access it with the "Do Menu" command. But, that doesn't allow you to specify the name of the file you want to recover. The workaround is to create a separate filemaker file with nothing in it except a recover script. The recover script has a single step in it: recover. You specify the name of your main file in it. Then, whenever you need to recover the main file, you open this other file and run the recover script. You can trigger it from applescript if necessary:

code:

tell app "FileMaker Pro"

close document "MainFile.fp5"

open document "RecoverFile.fp5"

tell document "RecoverFile.fp5"

do script FileMaker script "RecoverMainFile"

end tell

end tell


Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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