The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Find a task containing Thread Tools Search this Thread Display Modes
I've got a mail rule/applescript that parses incoming emails from our online help desk notification system and creates new actions in OmniFocus. I've got this working fine. (I'm converting from previous iCal todo based workflow and am new to OmniFocus)

The help desk also sends email notifications when help requests are completed-- I'd like to have a rule/applescript that finds the action tied to that help request and mark it completed. They will contain the unique incident ID in the form "Incident ID:xxx "

The code I'm looking at is something like:
  1. set theIncidentID to "Incident ID:30586 "
  2. tell default document
  3. set theTask to (the first action whose name contains theIncidentID)
  4. set completed of theTask to true

Unfortunately the 3rd line doesn't work or find anything.

Can anyone please give me a pointer on how to find and action/object that contains a certain text string? I suspect I need to access the data differently than I did in iCal todos.... Thanks!
 
I haven't done as much OmniFocus scripting as I have with our other products, so I don't know the answer off the top of my head. If you send an email to the support ninjas, though, they can knock on the appropriate doors and get this answered for you.
 
OF's scripting interface doesn't allow mass access to actions from the top level. You have to manually write functions to recursively "walk" down the tree of folders, projects, and action groups. See my Verify Next Actions Exist for an example of code that walks these trees.

Be warned that programmatically searching for actions like this is really slow, because your script has to send a large number of Apple Events. It would be great to get a more powerful scripting interface so one could write things like
Code:
set theTasks to every task whose name contains "TPS Repoort"
Use Help → Send Feedback to submit feature requests.
__________________
Cheers,

Curt
 
Hmm.. it might be more efficient to sync with ical and use my "Completed Items" script/mailrule to mark the iCal todo complete, then fire off a Sync with iCal call to Omnifocus.

Thanks for the info!

Quote:
Originally Posted by curt.clifton View Post
OF's scripting interface doesn't allow mass access to actions from the top level. You have to manually write functions to recursively "walk" down the tree of folders, projects, and action groups. See my Verify Next Actions Exist for an example of code that walks these trees.

Be warned that programmatically searching for actions like this is really slow, because your script has to send a large number of Apple Events. It would be great to get a more powerful scripting interface so one could write things like
Code:
set theTasks to every task whose name contains "TPS Repoort"
Use Help → Send Feedback to submit feature requests.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't change date for task started before today? [A: Remove constraint in Task:Schedule inspector] chaloum OmniPlan General 11 2013-07-05 12:23 PM
Find Omnifocus Task lexden OmniFocus Extras 7 2011-03-03 12:01 PM
Can't find overdue task marisa8184 OmniFocus 1 for Mac 6 2009-07-17 10:25 AM
locking the start of a task immediately upon completion of the previous task mr_projects OmniPlan General 0 2007-10-30 08:12 AM
Send Task / Receive Task update by Email samaparicio OmniFocus 1 for Mac 0 2007-07-10 07:58 PM


All times are GMT -8. The time now is 09:14 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.