【发布时间】:2014-03-04 00:00:30
【问题描述】:
问题标题说明了一切。我基本上是在尝试使用 AppleScript 设置已创建提醒的截止日期(有关更多背景信息,请参阅我创建的帖子 here)。我目前可以使用 AppleScript 代码制作一个带有截止日期的新提醒:
tell application "System Events" to set FrontAppName to name of first process where frontmost is true
if FrontAppName is "Reminders" then
tell application "Reminders"
set duedate to (current date) + (2 * days)
make new reminder with properties {name:"New Reminder", due date:duedate}
end tell
else
display dialog "failed to make new reminder!"
end if
但不知道如何将 newReminder 设置为“当前提醒”。有任何想法吗?到目前为止,我所拥有的代码是:
tell application "System Events" to set FrontAppName to name of first process where frontmost is true
if FrontAppName is "Reminders" then
tell application "Reminders"
set currentReminder to current reminder
set due date of currentReminder to current date
end tell
else
display dialog "failed to make new reminder!"
end if
添加截止日期(不提醒我日期)是 OS X 社区中一段时间以来一直要求提供的一项功能,我想为此制定一个合理的解决方法。目前设置它并不简单,不知道为什么。请参阅论坛帖子,例如: https://discussions.apple.com/thread/4142949?start=0&tstart=0 https://discussions.apple.com/message/24428695#24428695
非常感谢任何帮助。
【问题讨论】:
标签: applescript reminders