Skip to content

Instantly share code, notes, and snippets.

@pbt001
Forked from nriley/Move to Top.applescript
Created January 19, 2019 23:53
Show Gist options
  • Save pbt001/395a5bb2ed916363f927640d50070de8 to your computer and use it in GitHub Desktop.
Save pbt001/395a5bb2ed916363f927640d50070de8 to your computer and use it in GitHub Desktop.
Move tasks to the top of their containing task or project in OmniFocus
tell application "OmniFocus"
tell default document's first document window's content
set _tasks to (selected trees where its value's class is task)'s value
set _tasks to _tasks's reverse
repeat with _task in _tasks
tell _task's parent task
move _task to beginning of tasks
end tell
end repeat
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment