View Single Post
Quote:
Originally Posted by RobTrew View Post
The new objects will be placed, by default, at the end of that parent's children.
And if you should need them placed elsewhere, you can insert the necessary specification:

Code:
tell application id "OFOC"
	tell default document
		set oContext to first flattened context where name = "Library"
		
		tell (first flattened folder where name = "Reading Cycles")
			tell (make new folder with properties {name:"Shakespeare"})
				tell (make new project with properties {name:"Lear", note:"Sturm und drang", context:oContext}) to ¬
					make new task with properties {name:"First reading", note:"Skip the critical theory at this stage", context:oContext}
				tell (make new project with properties {name:"Othello", note:"Jealousy drives men mad", context:oContext}) to ¬
					make new task with properties {name:"First reading", note:"Joe Green thinks this might make a good opera, agree?", context:oContext}
				tell (make new project with properties {name:"Julius Caesar", note:"Beware the Ides of March!", context:oContext} at after first project) to ¬
					make new task with properties {name:"First reading", note:"Skip the critical theory at this stage", context:oContext}
				
			end tell
		end tell
	end tell
end tell