I'm trying to extract all the tasks from an OmniPlan document and I'm adapting one of Rob Trew's scripts to send OP tasks to OF so that it creates a TaskPaper document instead. It's working, but currently the script is only sending the selected tasks:
And I want to send the whole document without having to select, using something like:
Unfortunately the second form seems seems to have done a recursive descent of all tasks to populate the list, while leaving the descendants of each task intact. Consequently I see every task twice.
It there a way to get hold of some phantom root task or just the top level tasks?
Thanks
(have pity: I only opened "Learn AppleScript" on Friday)
Code:
tell window 1 set lstOPTasks to selected tasks of it end tell
Code:
tell document 1 of it set lstOPTasks to task of it end tell
It there a way to get hold of some phantom root task or just the top level tasks?
Thanks
(have pity: I only opened "Learn AppleScript" on Friday)