一、Microsoft To-Do List 与OmniFocus对比

两者功能相当,但OmniFocus3相对Microsoft To-Do List多的标签功能能有更多的维度来筛选。

二、同步流程

Microsoft To-Do List任务-> Exchange帐户同步到Renminders -> AppleScript脚本同步到OmniFocus的收件箱再进行整理 -> AppleScript脚本同步到Calendar

选择这个流程的原因

  1. Microsoft To-Do List可以跨多个平台方便收集数据
  2. Microsoft To-Do List没有提供AppleScript Suite,用快捷键 ⌘⇧O 打开查看
  3. OmniFocus支持多标签,可以从不同维度去管理信息
  4. Calendar可以提供日历提醒,其实OmniFocus也可以看,但我不相全依赖OmniFocus。

三、AppleScript脚本从reminders同步到OmniFocus的收件箱脚本

set emptyList to {}
tell application "Reminders"-- 在reminders的偏好设置中将默认列表设置为exchange帐户的taskstell default listset rmds to reminders-- 取tasks下面的reminders进行遍历repeat with rmd in rmdsset aname to name of rmdset createDate to creation date of rmdset modDate to modification date of rmd-- 根据当前reminder查找OmniFocus中是否有相同的reminder,如果没有就放到list中tell application "OmniFocus"tell default documentset inboxs to inbox tasksset flag to false-- display dialog inboxsrepeat with inbox in inboxsset nm to name of inboxif (nm = aname) thenset flag to trueend ifend repeatif (flag = false) thenset newList to {aname}set emptyList to emptyList & newList--   parse tasks into document with transport text nameend ifend tellend tellend repeatend tell
end telltell application "OmniFocus"--遍历list写入到OmniFocus收件箱repeat with elist in emptyList-- display dialog elistparse tasks into default document with transport text elistend repeatset emptyList to {}
end tell

前面因为没有将备注导过去,今天优化了一下代码,优化后的代码如下:

tell application "Reminders"tell default listset rmds to remindersrepeat with rmd in rmdsset aname to name of rmdset bd to body of rmdtell application "OmniFocus"tell default documentset inboxs to inbox tasksset flag to falserepeat with inbox in inboxsset nm to name of inboxif (nm = aname) thenset flag to trueend ifend repeatif (flag = false) thenset theTask to make new inbox task with properties {name:aname, note:bd}end ifend tellend tellend repeatend tell
end tell

四、AppleScript脚本从omniFocus同步到Calendar

以下代码是参考捉虫#2 - 在 OmniFocus3 中将动作发布到日历。需要注意的是,这个同步只会同步**未完成并且设置了预计持续时间截止时间**的Task。

-- unlocked2412
-- THIS SCRIPT MAKES CALENDAR EVENTS FROM OMNIFOCUS TASKS WHOSE
-- DUE DATES AND ESTIMATED MINUTES FIELDS HAVE VALID VALUES.property calendar_name : "Calendar" -- ENTER NAME OF YOUR CALENDARtell application "Calendar"set calendar_element to calendar calendar_name
end tell
tell application "OmniFocus"tell default documentset task_elements to flattened tasks whose ¬(completed is false) and (estimated minutes ≠ missing value) and (due date ≠ missing value)repeat with item_ref in task_elements-- GET OMNIFOCUS TASKSset the_task to contents of item_refset task_name to name of the_taskset task_note to note of the_taskset task_due to due date of the_taskset task_estimate to estimated minutes of the_task-- BUILD CALENDAR DATEset start_date to task_dueset end_date to start_date + (task_estimate * minutes)-- CREATE CALENDAR EVENTtell application "Calendar"tell calendar_elementif exists (first event whose (start date = start_date) and (summary = task_name)) thentell application "System Events"display dialog "The task: " & task_name & " is already in your calendar"end tellelsemake new event with properties ¬{summary:task_name, start date:start_date, end date:end_date} at calendar_elementend ifend tellend tellend repeattell application "System Events"display dialog "Done"end tellend tell
end tell

五、AppleScript脚本从reminders同步到Canlendar

如果不使用omnifocus可以直接从reminders同步到canlendar,此脚本需要设置默认帐记为你要同步的帐户。

property calendar_name : "Calendar"tell application "Calendar"set calendar_element to calendar calendar_name
end telltell application "Reminders"tell default accountset lsts to listsrepeat with lst in listsset rmds to reminders of lstrepeat with rmd in rmdsset task_name to name of rmdset task_note to body of rmdset start_date to remind me date of rmdset end_date to due date of rmdset cpd to completed of rmdif (cpd = false) and (start_date ≠ missing value) thentell application "Calendar"tell calendar_elementif exists (first event whose (start date = start_date) and (summary = task_name)) thentell application "System Events"display dialog "The task: " & task_name & " is already in your calendar"end tellelsemake new event with properties ¬{summary:task_name, start date:start_date, end date:end_date} at calendar_elementend ifend tellend tell--display dialog task_name & start_date & end_date & cpdend ifend repeatend repeatend tell
end tell

Microsoft To-Do List 、Mac Reminders 与OmniFocus相互同步方法及AppleScript脚本相关推荐

  1. mac远程桌面Microsoft Remote Desktop for Mac的安装与使用

    mac远程桌面Microsoft Remote Desktop for Mac的安装与使用 学习了:https://blog.csdn.net/ytangdigl/article/details/78 ...

  2. Microsoft Office 2008 for Mac Service Pack 1 更新后无法启动程序问题解决方案

    Microsoft Office 2008 for Mac Service Pack 1 更新后无法启动程序问题解决方案 1. 删除文件(不是根目录下的,而是你的用户名下的目录中...) ~/Libr ...

  3. Mac远程Win桌面官方工具——Microsoft Remote Desktop for mac

    微软官方专门为Mac用户提供了一款类Windows mstsc的远程桌面工具--Microsoft Remote Desktop for mac,专门用于远程控制Windows桌面. 但是.苹果App ...

  4. Microsoft Outlook 2019 for mac(电子邮件和日历工具)

    Microsoft Outlook 2019 for Mac破解版是一款非常好用的电子邮件和日历工具,Outlook是office办公软件套装的组件之一,可以帮助您收发电子邮件.管理联系人信息.记日记 ...

  5. Microsoft Outlook 2019 for mac(电子邮件和日历工具) v16.45Beta中文激活版

    Microsoft Outlook 2019 for Mac版是一款非常好用的电子邮件和日历工具,Outlook是office办公软件套装的组件之一,可以帮助您收发电子邮件.管理联系人信息.记日记.安 ...

  6. mac 远程桌面连接工具 Microsoft Remote Desktop for Mac 的安装与使用

    mac远程桌面工具Microsoft Remote Desktop for Mac  下载地址:https://pan.baidu.com/s/1idbmjBrJWToK3M8sSkQclA 打开之后 ...

  7. mac远程桌面Microsoft Remote Desktop for Mac - Mac-连接Windows远程桌面

    好记星不如烂笔头,这里记录平时工作中用到的东西,不喜可以留言. 1:在mac电脑远程桌面可以使用,Microsoft 远程桌面     使用 Microsoft Remote Desktop 这个还是 ...

  8. Microsoft Remote Desktop for Mac(远程桌面连接工具)

    Microsoft Remote Desktop for Mac是一款Mac OS平台上的远程桌面控制软件来自微软,你可以通过Microsoft Remote Desktop for mac来控制Wi ...

  9. Microsoft Remote Desktop for Mac(微软远程连接工具)

    Microsoft Remote Desktop for Mac是一款Mac OS平台上的远程桌面控制软件,你可以通过Microsoft Remote Desktop for mac来控制Window ...

  10. 完全卸载 Microsoft Office 2016 for mac 教程

    按照以下步骤即可将 Microsoft Office 2016 for mac 完全卸载.(需要以管理身份,即能够提供管理员名称.密码) 1 删除Office应用程序 "查找工具" ...

最新文章

  1. Android问题汇总
  2. postfix导入extmail.sql时报错
  3. 25个优秀的jQuery滑块教程和插件
  4. java json对象 输出_拼json字符串输出java对象
  5. 《鸟哥的linux私房菜-服务器篇 第三版》 RHCA亲授
  6. 美剧迷失_迷失(机器)翻译
  7. kali2.0安装mysql,Ubuntu/kali上安装MySQL,设置远程访问详细教程
  8. 数据库面试 - 如何设计可以动态扩容缩容的分库分表方案?
  9. python 2.7 input_Python2.7-fileinput
  10. 玩转 SpringBoot 2 之整合 WebSocket 篇
  11. 颠覆传统!麦肯锡的数字化咨询:只用5步,打造创新的数据架构
  12. Remove Duplicates from Sorted List解题报告
  13. Word删除空白页方法,由分节符导致多出空白页删除方法
  14. 最短路默写1最短路默写2
  15. 为什么打印还要另存为_为什么打印机一打印就会出现另存为
  16. VUE获取节日(中国节+国际节)
  17. uniapp扭蛋抽奖
  18. 夜神模拟器换完本机的ip连不上忘 fiddler也抓不到模拟器的包
  19. 重写hashcode方法需要重写equals方法吗?为什么?
  20. 华为网络精英挑战赛ICT部分

热门文章

  1. json.dumps()、json.laods()、demjson相关
  2. bootstrap table合并单元格
  3. TCP-Drinc:Smart Congestion Control Based on Deep Reinforcement Learning笔记
  4. 中国科学技术大学计算机考研好考吗,中国科学技术大学计算机考研复习方法谈(2)...
  5. 洛谷 P3456 [POI2007]GRZ-Ridges and Valleys
  6. android编程_5个在Android平台上进行编程的最佳应用
  7. 《星际争霸2》人工智能研究环境 SC2LE 初体验
  8. 中英文说明书丨CalBioreagents ACTH N端单克隆抗体
  9. 尚硅谷nodejs入门教程_笔记
  10. 程序员VS产品经理的世纪之争