View Single Post
This blob of code might also be helpful:
Code:
on copyChildTasks(sourceTree, destTree, destProject)
	using terms from application "OmniPlan"
		repeat with c in child tasks of sourceTree
			set newTask to my copyTask(c, destTree, destProject)
			my copyChildTasks(c, newTask, destProject)
		end repeat
	end using terms from
end copyChildTasks
and
Code:
set frontWindow to front window
set destDoc to document of frontWindow
set destProject to project of my destDoc
tell destProject
	set newProjectRoot to make new task with properties {name:sourceName, note:projnote}
end tell