Rebeccas Workbench: The Pet Projects of Rebecca OConnell

Coding Projects

Sunday, July 6, 2008

Scripts Based on Curt Clifton's Populate Template Placeholders Script

Lately I have been scripting add-ons for Curt Clifton's Populate Template Placeholders script. They're all slow, because the only way I could find to move the project was to move it to the parent folder, then the first level child folder, and so on until it finally reaches its destination. Additionally, they won't work if the folder you want to move the project to isn't visible in the sidebar, but other than that... So, they're not quite as elegant as the original, but they do add functionality, so here they are. Note: I have since solved the problem, but have not yet implemented the solution in these scripts:

Populate, Activate, Relocate Template Placeholders

Download Script


Picks up where Curt's script leaves off, changing the status of the project from whatever it was to start with (mine are usually "Dropped") to Active, then moving the new template to a location specified by a string in the second to last paragraph of the notes.


The string should be in the format "{top level folder name: second level folder name : folder that will contain the project}" or just "{top level folder name}" for a folder directly inside the Library. If there is no file path, nothing happens.


To use, select the template you want to create a project for in the sidebar, and run the script.

Populate, Activate, Relocate Template Placeholders for Multiple Templates

Download Script


It does exactly what "Populate, Activate, Relocate Template Placeholders" does, with the same limitations, but it will process more than one template at a time. If two of your projects have a placeholder with the same name, the script will ask for the replacement value once and use it for all instances of the placeholder.


To use, select the templates you want to create projects for in the sidebar, and run the script.

Move Templates to Designated Path

Download Script


Picks up where Curt's script leaves off, but without running Curt's script first. You select your new projects in the sidebar, and the script looks for a file path in the last or second to last paragraph of the notes. It then moves the project to where the file path tells it to go, and deletes the paragraph containing the file path.



The file path should be in the format "{top level folder name: second level folder name : folder that will contain the project}" or just "{top level folder name}" for a folder directly inside the Library. If there is no file path, nothing happens.

Thursday, July 3, 2008

Set Contexts For Tasks that Have No Contexts (Visible Projects Only)

Download Script


Most of my tasks happen in one context. I don't feel like manually adding a context to each of them - or even setting a default context for each project. In my world, if a project has a task, it is not stalled. This script brings my world into being. I would just have it cycle through all the tasks in the document, but I think that involves recursion, and it's too late at night to mess with recurrsion.