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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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