View Single Post
Hi Everyone,

Good to see the developers of the app involved here. I'm sure everyone appreciates their help.

I am having some issues. I've never done much ActionScript but I have most of it working but the OmniPlan part is a bit differernt.

I'm trying to open an existing OmniPlan document and add a new task to the document. I don't seem to be able to add a task.

The code I have atm is:

Code:
tell application "OmniPlan"
	activate "OmniPlan"
	
	set myDoc to make new document
	
	tell myDoc
		--set myDoc to front document
		
		tell front document
			set Myself to make new resource with properties {kind:person, efficiency:2, name:"Tom", cost per hour:200.0}
			set MyTask to make new task with properties {name:"Cure Cancer", duration:8.0}
			assign MyTask to Myself
		end tell
	end tell
	
end tell