The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Today's Posts

 
AppleScript Requests Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Here's a slightly improved version. It creates an invisible window to do the data extraction, so your existing windows aren't affected, and it handles the case of an action without a context.

Code:
property TargetPerspective : "Geek Tool" -- set this to the name of the perspective that shows desired actions

set taskList to ""
tell application "OmniFocus"
	tell default document
		set _window to make new document window with properties {visible:false} at front of document windows
		tell _window
			set perspective name to TargetPerspective
			set oTrees to trees of content
			set n to count of oTrees
			repeat with i from 1 to n
				set oTask to value of (item i of oTrees)
				set taskTitle to name of oTask
				try
					set projContext to name of context of oTask
				on error
					set projContext to "(No Context)"
				end try
				set taskList to taskList & " •    " & taskTitle & "  (" & projContext & ")
"
			end repeat
		end tell
		close _window
	end tell
end tell
return taskList
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Perspective Requests Stephen Brown OmniFocus for iPad 4 2012-02-12 08:01 AM
Two requests gshenaut OmniFocus 1 for Mac 3 2011-01-08 09:06 AM
Feature Requests specialmoves OmniGraffle General 1 2008-06-26 03:54 PM
Feature/UI Requests Jon Hicks OmniWeb General 88 2007-03-15 02:08 PM
Few requests... thestaton OmniWeb Feature Requests 2 2006-11-15 12:57 PM


All times are GMT -8. The time now is 01:07 PM.


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