Jump to content

Recover Command Applescript


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

Recommended Posts

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.

Link to comment
Share on other sites

  • 3 weeks later...

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


Link to comment
Share on other sites

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