The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   Appscript to delete project (http://forums.omnigroup.com/showthread.php?t=17224)

Gambusia 2010-08-07 07:57 AM

Appscript to delete project
 
I can't seem to delete a project contained in a folder using appscript (scripting bridge to AppleScript from Ruby). I can "see" the project and manipulate its contents using appscript--I just can't seem to delete it. Here's what I have:

[CODE]
require 'rubygems'
require 'appscript'

of = Appscript.app('OmniFocus').default_document
st = of.folders['My Folder'].projects['My Project']

st.delete
[/CODE]

I can retrieve the name of st, count its tasks, create new tasks for it, etc. I just can't delete it.

The error says that it's an OSERROR: -10000 with message: "Apple event handler failed."

Can anyone help? Thanks.


All times are GMT -8. The time now is 11:27 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.