Skip to content

Instantly share code, notes, and snippets.

@al3xandru
Created September 21, 2011 01:31
Show Gist options
  • Save al3xandru/1230955 to your computer and use it in GitHub Desktop.
Save al3xandru/1230955 to your computer and use it in GitHub Desktop.
Choose a Waiting context in OmniFocus
-- accumulate all context names that contain the "wait" substring
repeat with anItem in (complete "wait" as context)
set waitingForContextNamesList to waitingForContextNamesList & {(name of anItem)}
end repeat
choose from list waitingForContextNamesList with prompt "Choose Waiting context…" OK button name "Set" cancel button name "Cancel"
set chosenWaitingForContext to result as string
set theContextID to id of item 1 of (complete chosenWaitingForContext as context)
-- this last line fails even if theContextID is correct
set theWaitingForContext to first context whose id is theContextID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment