View Single Post
Got a solution :)
Hope it helps anybody.


Code:
tell application "OmniPlan"
	activate
	set xString to "Neuer Task  2" -- uniqe name of my task
	
	tell front document
		-- set xoutput to title of it
		-- set foundTask to (every task whose name is xString) -- many results possible
		set foundTask to (first task whose name is xString) -- only one result
		set xoutput to completed of foundTask
		-- set completed of foundTask to 1.0 --set to 100%
	end tell
	
	--set xoutput to completed of document 1
	
	tell front window
		set selected tasks to foundTask
	end tell
end tell

xoutput