The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniPlan > OmniPlan Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Find and get/set completed of Task with AppleScript Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Hi folks,

I'm new to AppleScript and I want to get/set the completed value of specified tasks.
I tried many ways but it does not work.
I'm only able to get the overall Percentage of the Project.
Any idea? Here is my try.

Thank you verry much.
Olbea

Code:
tell application "OmniPlan"
	activate
	set xString to "Vorgang 1"
	
	tell front document
		set xoutput to title of it
		set foundTask to (every task whose name is xString)
		set xoutput to completed of it  --gets project percentage
                -- I tried this: (1)
                -- set xoutput to completed of first task of foundTask
                -- But it does not work 
	end tell
	
	tell front window
		set selected tasks to foundTask
	end tell
end tell

xoutput
Error (1): error "„task 1 of {task id 1 of scenario 1 of project of document \"Ohne Titel.oplx\" of application \"OmniPlan\"}“ kann nicht gelesen werden." number -1728 from «class Optk» 1 of {«class Optk» id 1 of «class OPso» 1 of «class OPpj» of document "Ohne Titel.oplx"}
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 05:14 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.