MoodBlast and iCal

Note: This post is over 6 months old. You may want to check later in this blog to see if there is new information.

A quick script that can be triggered from iCal to send a blast with MoodBlast…

Copy the code below into script editor, or just click here to open it in Script Editor directly. Save it as a compiled script file (.scpt) and put it in a scripts directory. When you set up an alarm in iCal, choose “Run Script” and select this script. You set the text for the blast in the description field. You can use all of the fun stuff, including specifying which services to update using the “^” overrides. For example, just start the string with ^sa to send only to Skype and Adium, regardless of your current checkbox selections in MoodBlast. You can set a status (@keyword) and update your moods with what you’re doing (or at least supposed to be doing) automatically. Fun stuff.

icalblast

  1. on searchEvents()
  2. set currentWinner to {null, 86400}
  3. tell application "iCal"
  4. set theCalendarList to (every calendar)
  5. repeat with theCalendar in theCalendarList
  6. set eventList to get ((every event of theCalendar) whose (filepath of open file alarm of it) is not missing value)
  7. repeat with anEvent in eventList
  8. set alarmPath to ((filepath of open file alarm of anEvent) as string)
  9. if alarmPath contains (POSIX path of (path to me) as string) then
  10. set diffdate to ((current date) - (start date of anEvent))
  11. if diffdate is less than 0 then
  12. set diffdate to -1 * diffdate
  13. end if
  14. if diffdate < item 2 of currentWinner then set currentWinner to {anEvent, diffdate}
  15. end if
  16. end repeat
  17. end repeat
  18. if item 1 of currentWinner is not null then return description of item 1 of currentWinner as string
  19. return ""
  20. end tell
  21. end searchEvents
  22.  
  23. set theBlastString to searchEvents()
  24. if theBlastString is not "" then tell application "MoodBlast" to blast theBlastString

» » » »
  1. MoodBlast version up: 2.49.8 — Circle Six Blog 10.27.07 / 9pm

    […] the general preferences. And support is added for NetNewsWire. If you haven’t checked out the iCal integration, you should. I’m loving it. Visit the download page or use the “Check for […]

Have your say

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>




Safari hates me