Last active
July 15, 2019 09:15
-
-
Save n8henrie/9dd700ab65539921f82d to your computer and use it in GitHub Desktop.
Searches all tasks in OmniFocus 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Searches all tasks in OmniFocus 2 | |
-- Originally posted at: http://n8henrie.com/2014/07/omnifocus-2-applescript-search-all-tasks | |
-- See discussion and where I got help: http://n8h.me/1lga54b | |
(* My `Search All` and `Search Remaining` perspective settings -- only difference is in Filter by Availability: | |
## Project Hierarchy | |
- Don't use project hierarchy | |
## Presentation | |
- Group actions by: **Ungrouped** | |
- Sort action by: **Added** | |
## Filtering | |
- Filter by status: **Any Status** | |
- Filter by availability: **All** OR **Remaining** | |
- Filter by duration: **Any Duration** | |
- Filter by contexts: **All Contexts** | |
*) | |
on run | |
set my_dialog to (display dialog "Search for:" default answer "Enter search term" buttons {"Cancel", "Search All", "Search Remaining"} default button "Search Remaining") | |
set search_perspective to button returned of my_dialog | |
set search_text to text returned of my_dialog | |
tell application id "com.omnigroup.omnifocus2" | |
activate | |
tell default document | |
tell first document window | |
set perspective name to search_perspective | |
set search term to search_text | |
end tell | |
end tell | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment