Hi, I'm trying to write a script which would take all of the information from a selected task and create a new task which opens in a quick entry box so that I can edit it. Here's what I have:
First of all, I can't find a way to get the name, context, etc. of the selected task without that repeat. It works, but I don't need a repeat, so I'd like to get rid of it. Also, I can't find a way to set the project. What I have now seems to just crash OF. Any help would really be appreciated.
-Matt
Code:
tell application "OmniFocus" tell front document tell content of document window 1 set theSelection to value of every selected tree repeat with anItem in theSelection set itemName to name of anItem set itemContext to context of anItem set itemProject to containing project of anItem end repeat end tell tell quick entry open set newTask to make new inbox task with properties {name:itemName, context:itemContext, assigned container:itemProject} select {inbox task 1} end tell end tell end tell
-Matt