Discussion in another thread suggests that OmniFocus Ver 2 will allow us to set the status of a Folder to On Hold.
In the meanwhile, here is a draft applescript which toggles the contents and descendants of the selected folder between On Hold and Active (leaving the status of Completed and Dropped projects unchanged).
--
In the meanwhile, here is a draft applescript which toggles the contents and descendants of the selected folder between On Hold and Active (leaving the status of Completed and Dropped projects unchanged).
Code:
-- Ver 0.4 -- Toggles contents and descendants of the selected folder between ON HOLD and ACTIVE -- The status of any COMPLETED and DROPPED projects is left unchanged -- Any DROPPED subfolders are also left unchanged tell application id "com.omnigroup.OmniFocus" tell front window set lstFolders to value of (selected trees of sidebar where class of value is folder) set refProjects to a reference to value of (selected trees of sidebar where ¬ (class of value is project) and ((status of value is active) or (status of value is on hold))) end tell repeat with oFolder in lstFolders my ToggleFolderStatus(oFolder) end repeat set lstStatus to status of refProjects if length of lstStatus > 0 then if first item of lstStatus is active then set status of refProjects to on hold else set status of refProjects to active end if end if end tell on ToggleFolderStatus(oFolder) using terms from application "OmniFocus" set refProjects to a reference to (projects of oFolder where (status is active) or (status is on hold)) set lstStatus to status of refProjects if length of lstStatus > 0 then if first item of lstStatus is active then set status of refProjects to on hold else set status of refProjects to active end if end if set lstFolders to folders of oFolder where hidden is false repeat with oSubFolder in lstFolders my ToggleFolderStatus(oSubFolder) end repeat end using terms from end ToggleFolderStatus
Last edited by RobTrew; 2010-05-29 at 12:03 AM.. Reason: Allow for selecting and toggling more than one folder