AppleScript to create new subtasks to the selected task

I’d love to be able to add subtasks to a currently-selected task via applescript.

My use case is:

  • I have a task that requires input from several people – let’s say “Get input on what toaster to buy”
  • I want to be able to push an applescript button that will create a subtask for each team member
  • I want to set the context to that team member’s name

I know how to:

make new inbox task with properties {name:"John", context:"John"}

… but that puts the task in the inbox, and doesn’t create it as a subtask to the “Get input on what toaster to buy”.

Note: I want to add it to an existing task, not a project.

I found a solution.

Curt Clifton’s Add Standard Children script did the trick. :)