View Single Post
Hi guys and gals,

And a BIG HI to Lizard,

My script is evoluting I need to create group and affects task to it.

I can't succeed! Could you please help?

my script is:

property ATime : date
property BTime : date
property CDuration : 4
property ADur : 4
property BDur : 4

set CTime to (current date)

tell application "OmniPlan"
tell document "planning"
set MyTask to make new task with properties {name:"Cure Mat"}
set MyTask to make new task with properties {name:"Bisoux", starting date:CTime, duration:CDuration}
set duration of task "Bisoux" to 1
set ATime to current date
set starting date of task "Bisoux" to ATime

set task type of task "Cure Mat" to group task
set parent task of task "Bisoux" to "Cure Mat"

end tell
end tell


As you can probably see if you try it, it fail on the last instruction line. I got an error message:"OmniPlan got an error: Can't make "Cure Mat" into type task."

What to do?