Skip to content

Instantly share code, notes, and snippets.

@cdzombak
Created June 3, 2015 03:13
Show Gist options
  • Save cdzombak/f367511c8a102a9e6404 to your computer and use it in GitHub Desktop.
Save cdzombak/f367511c8a102a9e6404 to your computer and use it in GitHub Desktop.
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