The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Getting list of unselected items (http://forums.omnigroup.com/showthread.php?t=24873)

sgoldstein 2012-07-11 08: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)

Questions:
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?

Thanks!

RobTrew 2012-07-11 10: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 05:06 PM.

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