The Omni Group Forums

The Omni Group Forums (
-   OmniFocus Extras (
-   -   Getting list of unselected items (

sgoldstein 2012-07-11 09:43 PM

Getting list of unselected items
I'm trying to modify the Snooze script to snooze unselected items rather than those that are selected. I'm new to Applescript, though, so I'm not sure the best way to proceed. Clearly the following line obtains the selected items:

set validSelectedItemsList to value of (selected trees where class of its value is not item and class of its value is not folder)

1. What are the possible classes of value attributes? What is the "item" class?
2. Assuming there is no object for unselected items, I'm guessing I would have to get the full list of items in the view and then remove the selected ones? Is there an easy way in applescript to find the relative complement of the selected items with respect to the total without two nested for loops?


RobTrew 2012-07-11 11:35 PM

[CODE]tell application id "OFOC"
tell sidebar of front document window of default document
set lstProjects to value of descendant trees where selected = false and class of its value is not item and class of its value is not folder
end tell
end tell[/CODE]

Filtering out objects which return a class of [I]item[/I] just excludes non-data items like the Inbox and Library nodes in the sidebar tree, and various grouping labels in the content panel.

All times are GMT -8. The time now is 01:56 AM.

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