View Single Post
I'd like to automate the backing up and restoring of the OmniFocus DB. I'm hoping to hook this up such that I can have the DBs on my two machines sync with less manual input.

There doesn't appear to be anything in the OmniFocus Applescript dictionary, and my attempts to try and automate by selecting menu items have failed.

I've used a script like this to try the latter:

tell application "System Events"
tell process "OmniFocus" to tell menu bar 1
click menu item "Back Up Database..." of menu "File"
end tell
end tell

But when executing this, I get the following error:

of-save.scpt:78:137: execution error: System Events got an error: Canít get menu item "Back Up Database..." of menu "File" of menu bar 1 of process "OmniFocus". (-1728)

Does anyone know what's going wrong here? Is there any easier way to achieve what I'm after?