The Omni Group Forums

The Omni Group Forums (
-   OmniFocus Extras (
-   -   [Request/Idea] Script that puts tags into task title (

Christian 2011-07-09 09:51 AM

[Request/Idea] Script that puts tags into task title
Hello coding-people :)

To put it first, I have no idea of scripting/coding so I can not say if what I thought of is doable and/or worth the effort it might take to make it happen.

What I would love to have is a script that runs with OF for Mac. It should do one simple thing: if you assign a specific context to an action the script should automatically add a predefined tag in front of the action description (followed by a space to make it look decent).


I create action "Rob's feedback about project pegasus". I assign my context "waiting for" to this action. The script notices that the action is in the "waiting for"-context-group and adds a [Waiting] in front of the action title. End result: "[Wait] Rob's feedback about project pegasus".

Ideally the script was flexible enough so I could add more tags linked to other contexts if need be. It would also be preferable if the script would run whenever an action is assigned another context so if I, for example, move an already existing action from context "call" to context "waiting for", the script would automatically detect that and add the [Wait] tag.

Not knowing if that is at all possible but if it is it would be perfect if the script would also remove the tag if I assign a context that is not listed in the script.

Why am I asking for this? Well, in the iPad version's timeline-view it shows my actions due today. In the subtitle is shows the project the action belongs to, yet unfortunately not which context has been assigned to it. With the script I have in mind there would be a tag in front of specific actions, telling me which context they belong to.

Is that doable?

Thank you in advance!

Lizard 2011-07-11 04:22 PM

It would be possible to write a script that you could trigger manually, that could scan for recently changed tasks and check that their tags are correct according to your rules. OmniFocus isn't really set up to have scripts run automatically when tasks are added or modified.

Christian 2011-07-11 09:24 PM

So in practice I would mark one or multiple actions and then hit a button telling a script to add a certain tag in front of their name? That would be sufficient for my needs I think.

How do I do that?

Thank you for your help with this!

Lizard 2011-07-12 02:07 PM

Sorry for any confusion -- I know it's possible, but it would be a fair amount of work and I've got other stuff I need to work on.

Meanwhile, I've added a vote to the feature request for the underlying issue here: Add context info for actions displayed in forecast view.

Christian 2011-07-12 10:36 PM

My excuses, I did not mean to ask you or anybody to do this for me, merely for some tips how I could approach the topic. Then again I have never coded anything before and if you say its a lot of work then it might not be worth it to learn coding...

Context info for actions in forecast mode sounds like a solution to this. Thanks for adding it!

Lizard 2011-07-13 05:30 PM

If you do decide to tackle it, I'd recommend first taking a peek at some of the other scripts on the forums and finding one that does something similar to what you want. You can open them in AppleScript Editor, which should be in Applications > Utilities. Read through it, and figure out what it's doing. Then start changing it, little bit by little bit, to do what you want. Once you've got it partly working, you might come back and ask the forum for help with specific questions.

There are several books and websites about learning AppleScript also. I'm not sure which ones are the best these days.

All times are GMT -8. The time now is 02:24 PM.

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