The Omni Group Forums

The Omni Group Forums (
-   OmniFocus Extras (
-   -   Populate Template Placeholders, 0.6.1 (

curt.clifton 2009-06-25 12:15 PM

Populate Template Placeholders, 0.6.1
I've posted an updated version of my Populate Template Placeholders script to [URL=""]my software page[/URL]. Here's a description of the script lifted from there:

Templates were the only thing missing in the current version of OmniFocus that were part of my old GTD system. But the scripting interface in OmniFocus is solid enough to implement them!

Here is a script that will take an OmniFocus project, replace placeholders with user entered strings, and adjust all dates by some fixed interval-again based on user input. Installation and use instructions are included in the download.

The latest version can handle apostrophes and other punctuation inside the replacement text. Itís also faster and has a shiny new icon so itís spiffy on your tool bar.

Share and enjoy!

jeremydb 2009-06-26 06:53 AM

Hi Curt -

Thanks for your script. Unfortunately, I get an error when I run it. The line "duplicate (value of item 1 of theSelectedItems) to after last section" throws the following error (translated from German):

Objects of the class "task" cannot be put after <Document: 0xWHATEVER>. scriptSections requires "section".

Any ideas?

Thanks, Jeremy

curt.clifton 2009-06-26 08:41 AM

Sorry for the confusion. You need to select a Project to be populated, not an Action. I'll add code to check for that to a future version of the script.

Edit: Iíve posted that update. Version 0.6.2 is now available.

jeremydb 2009-06-26 09:23 AM

I actually modified your script to work with actions, as well, and to not require subsitutions, if all you want is to dupe the project to some other time, changing the dates. There is a bug in OF's handling of repeating actions containing nested actions, so this script seems to be a way around it. I can send you the mods, if you want them.

curt.clifton 2009-06-26 09:40 AM

I'm glad the script provided a useful starting point. Feel free to post the mods here so others can use them.

BwanaZulia 2009-06-26 11:30 AM

Great script. Been using it forever. Would love for OG to put this in the product, but it has been working so long, I guess it is all good.


kingsinger 2009-07-01 03:04 PM

Bug in ver .70?
Apologies if this isn't the right place to raise this.

I downloaded version .7 and when I tried to use it I got the following error

AppleScript reported the following error:
OmniFocus got an error: Canít get name of value of tree 1 of content of document window id 14081 of document id "iAF1BObmx-F".

curt.clifton 2009-07-01 04:31 PM

Odd, I've never seen that particular error. What steps do you have to take to reproduce the error? What versions of OF and the operating system are you using?

RobTrew 2009-07-02 09:21 AM

[QUOTE=kingsinger;62099]AppleScript reported the following error:
OmniFocus got an error: Canít get name of value of tree 1 of content of document window id 14081 of document id "iAF1BObmx-F".[/QUOTE]

Glancing at the script, I would guess that it's just an unhandled selection.

Try, for example, to run it while selecting the "No Context" icon in the content pane or sidebar of Context view (or the Inbox icon in the content pane or sidebar of Project view): it would probably trigger an error of this kind. (These nodes don't have name properties).


curt.clifton 2009-07-02 10:37 AM

Thanks, Rob. Interestingly, those nodes have name properties, but if you take the name [I]of the value[/I] of such a node you get an error.

That gave me a better way to do my checks for correct selections. Version 0.7.1 is now available from [URL=""]my software page[/URL].

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

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