The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   AppleScripting Omni Apps (http://forums.omnigroup.com/forumdisplay.php?f=46)
-   -   Auto Delete Completed Projects with certain word in title. (http://forums.omnigroup.com/showthread.php?t=28541)

m_kuhn 2013-03-02 02:52 AM

Auto Delete Completed Projects with certain word in title.
 
I'm guessing something like this already exists.

I have many projects with the word "Routine" in the title. As such, they get repeated very often. At the end of the week I have several completed projects with the word "Routine" in the title littering several folders of projects.
As of now I have a "routine" to clean them up and delete them manually.


It would be great if a script could automatically look for any completed project with the word "routine" in the title and delete them for me.

Anybody heard of such a script?

Thanks in advance.

RobTrew 2013-03-02 11:14 PM

Data-deleting scripts need to be handled with extreme caution, and a readiness to use [B]Edit > Undo[/B] ⌘Z immediately afterwards.

If you wanted to create one, you could uncomment the delete line in something like this:

[CODE]tell application id "OFOC"
tell default document
set refZap to (flattened projects where completed = true and name contains "routine")
-- delete refZap
end tell
end tell[/CODE]

whpalmer4 2013-03-02 11:35 PM

My suggestion would be to use Rob's Where in OF script instead, utilizing its ability to save queries for future use. When it is time to do some housekeeping, use the script to pull up the projects to be deleted, have a good careful look at the scripts proposed for deletion, and then delete once satisfied the list is correct.

RobTrew 2013-03-02 11:43 PM

Currently at:

[URL="http://complexpoint.macmate.me/Site/Find_in_OmniFocus_by_Query.html"]http://complexpoint.macmate.me/Site/Find_in_OmniFocus_by_Query.html[/URL]


All times are GMT -8. The time now is 10:21 PM.

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