【发布时间】:2018-02-01 05:15:22
【问题描述】:
我正在尝试使用 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 新手,感谢任何帮助 ;)
【问题讨论】:
标签: applescript omnifocus