Quote:
Originally Posted by lexden
search for a string in a task title and return that task's id
|
Code:
property pTopic : "Get ID(s) of tasks matching string"
set str to text returned of (display dialog "Enter string:" default answer "" with title pTopic)
tell application id "com.omnigroup.OmniFocus"
tell default document
set lstID to id of flattened tasks where name contains str
end tell
end tell
set text item delimiters to return
display dialog "Tasks containing: " & str & "
" & lstID as string buttons {"OK"} with title pTopic
set text item delimiters to space