View Single Post
After using the script for a bit, I need to hack it just a bit to include the original Context in the task that's placed into the "Waiting" context.

If you haven't tried this nice little script, essentially what it does is copy the highlighted task(s), marks the original task(s) "Complete" (leaving it in the original context) and then putting the duplicated task into the "Waiting" context. It prepends the task in the Waiting context with text of your choice (I have mine set to "Awaiting:").

Due to the way that I use contexts, particularly for Agenda items, I need a bit more info in the copied task. I want to put a trailer on the task that shows the original context (remember, the copied task is now in the "Waiting" context).

With the current script, the task in the Waiting context looks like this:
Awaiting: bla bla bla

I would like it to look like:
Awaiting: bla bla bla From:originalContext (e.g. Agenda)

Alternatively it could simply be:
Awaiting from originalContext - bla bla bla

Either way, the trick is to capture the original context. I tried the following (only a portion of the original script) but I get an error.

set itemTitle to name of anItem
set oldContext to context of anItem
set theDupe to duplicate anItem to after anItem
set completed of anItem to true

-- Configure the duplicate item
set oldName to name of theDupe
set name of theDupe to waitingPrefix & oldName & " From: " & oldContext
set context of theDupe to theWaitingForContext
set repetition of theDupe to missing value

Any suggestions?

Thanks!

Last edited by rebunkerjr; 2009-04-11 at 05:35 AM..