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"}