View Single Post
FWIW it's also possible to nest the make commands within the scope of the appropriate parent objects using tell ... end tell.

The new objects will be placed, by default, at the end of that parent's children.

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}
			end tell
		end tell
	end tell
end tell