Dismiss iCal alarm without mouse?

In AppleScript Editor, create the following script:

tell application "iCal Helper" to quit
delay 2
tell application "iCal Helper" to launch

Using an application like Quicksilver, Butler, FastScripts (lite), Controllermate, etc. create an action/shortcut to launch the script.

The reason I relaunch the application is that we want it open in the background for the next event/message.


You can use applescript. This will make the iCal alarm active:

tell application "iCal Helper"
 activate
end tell

You can use something like FastScripts, QuickSilver, LaunchBar, or your keyboard shortcut app of choice to launch the script with a keyboard shortcut of your choosing, and then you can type escape to dismiss it.

I don't think the iCal Helper app is scriptable beyond this as I couldn't get an escape key or a mouse click via mouse coordinates to pass to it. Still, you could give the script a shortcut like Option-Escape, and then follow up with another escape manually to dismiss it.

I couldn't get this to work on 10.5.8, but maybe iCal Helper is more scriptable in 10.6?

tell application "iCal Helper"
 activate
 click at {1062, 300}
end tell

I got the coordinates by typing Command Shift 4 as the screenshot app gives coordinates. The alarms conveniently show up at the same place, but your monitor resolution will cause your coordinates to be different from mine. If anyone is more knowledgeable about AppleScript than me I'm curious why exactly the above "click at" line doesn't work.