我正在尝试使用 AppleScript 来查找现有的 OmniFocus 任务并根据某些规则附加项目和上下文。这是有效的,除了:
当我创建新任务时,我试图note
直接复制属性。在 OmniFocus 的字典中,它说该note
属性是“富文本”,但在新任务中它似乎已成为纯文本(特别是,我想保留的文本中的链接正在消失,但还有其他风格正在消失)
on set_project_and_context(the_task, the_project, the_context)
tell application "OmniFocus"
tell front document
set task_name to name of the_task
set task_note to note of the_task
set new_text to task_name & " ::" & the_project & " @" & the_context
set new_tasks to (parse tasks into with transport text new_text with as single task)
set new_task to item 1 of new_tasks
set due date of new_task to missing value
set note of new_task to task_note # <- HERE IS WHERE I'M TRYING TO COPY THE NOTE
delete the_task
end tell
end tell
end set_project_and_context
我是 AppleScript 新手,因此感谢您提供任何帮助;)