Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
OmniFocus AppleScript to move an action to my " Dropped" context and mark it completed.
property droppedContext : "Dropped"
tell application "OmniFocus"
tell front document
try
set theDroppedContextID to id of item 1 of (complete droppedContext as context)
set theDroppedContext to first flattened context whose id is theDroppedContextID
on error
display alert "No context found whose name contains “" & droppedContext & ""
return
end try
tell content of document window 1
set taskList to get value of every selected tree
repeat with aTask in taskList
set context of aTask to theDroppedContext
set completed of aTask to true
end repeat
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment