开发者

Applescipt to find events in iCal

I'm new to the world of Applescript! I'm trying to figure out how to find into a specific calendar events that contains certain words. In particular, I don't know how to make a repeat that find certa开发者_如何学编程in word in the calendar's events...

Thanks in advance


There's a MacTech tutorial here which includes a search example: http://www.mactech.com/articles/mactech/Vol.21/21.11/ScriptingiCal/index.html

Here's a working example of how you might find calendar events that match a search criterion:

tell application "iCal"
    tell calendar "Domestic"
        set theEventList to every event whose summary contains "Recycling"
    end tell
    set theEvent to first item of theEventList
    return summary of theEvent
end tell

This example works for me. It finds all events in my "Domestic" calendar which contain the term "Recycling" and then returns the summary of the first one in this list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜