Applescript Snippet Request: Get Tasks for Context
Hi,
I am writing an Applescript where I want to iterate thru all of the tasks within a given context. For example: - get all tasks with a context of "Waiting"... --- then for each task.... ---- do something If anyone has a code snippet that could get me started I would appreciate it. Thanks in advance! Ken |
Hope this makes sense:
[CODE]tell application "OmniFocus" set strContextName to "Waiting" tell front document set lstMatches to complete strContextName as context if length of lstMatches > 0 then set recMatch to item 1 of lstMatches set strID to id of recMatch set oContext to context id strID set lstAllTasks to tasks of oContext set lstAvailable to available tasks of oContext set lstRemaining to remaining tasks of oContext else display dialog "Context: " & strContextName & " not found." end if end tell end tell[/CODE] |
Rob,
Thank you! That worked perfectly! Regards, Ken |
All times are GMT -8. The time now is 06:04 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.