applescript检查今天是否事件
有没有办法编码检查iCal的苹果订阅? 我想制作一个applescript:如果今天的事件是,然后执行任务。
或反向:如果事件是今天今天,那么执行任务。
谢谢 ;-)
Is there a way to code an AppleScript that check iCal ?
I want to make an AppleScript that do: if an event is today then do a task.
Or the inverse : if an event is not today then do a task.
Thanks ;-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要检查日期是否在特定日期内,您必须减去
time
从日期(和当前日期)开始,该部分实际上将时间设置为0:00:00该处理程序将其处理
日历
事件并返回true
如果事件的开始日期今天在今天的开始日期作为第二个参数。
一个替代方案是AppleScriptObjc,它可以访问基础框架
To check if a date is within a specific day you have to subtract the
time
portion from the date (and the current date) which practically sets the time to 0:00:00This handler takes a
Calendar
event and returnstrue
if the start date of the event is in todayIf this handler is called many times create
startOfToday
outside of the handler and pass it as second parameter.An alternative is AppleScriptObjC which has access to the Foundation framework
日历。APP检查事件应在事件的指示开始时间时执行附加警报。您有能力在事件开始时间之前的某个时间来指示日历。提供的警报之一是打开文件警报,这是您所需要的。
因此,
,在事件的指示开始时间上,它将在默认脚本编辑器中自动打开您的附件编译脚本,或者将运行 script作为应用程序,附着。或者,它将打开 preview.app中的一些图像,如果附加了图像文件,请打开。即使galendar.app根本不运行。
在YouTube上存在此视频教程以帮助更多帮助: https://www.youtube.com/wwatch.com/wwatch ?v = 2hhfzichegy 对于使用Mac 上的自定义日历警报。
The Calendar.app checks itself when the event should perform attached alerts at the indicated start time of event. You have ability to indicate to Calendar.app to perform attached alert some time before start time of event, as well. One of provided alerts is open file alert, which is what you need in your case.
So,
Now, on indicated start time of the event, it will automatically open your attached compiled script in default script editor, or will run script saved as application if one was attached. Or, it will open some image in the Preview.app if the image file was attached, an so on. Even if the Calendar.app is not running at all.
On the Youtube exists this video tutorial to help more: https://www.youtube.com/watch?v=2HhFzIcHEGY for Using Custom Calendar Alerts On Your Mac.