The macnotify package is designed to bounce Mac applications on the Dock when the application is not frontmost on the screen and it displays an alert (in the form of a tk_messageBox). The package works via a combination of Tcl and AppleScript. It provides functionality similar to Daniel Steffen's tclCarbonNotification package, but is a script-level package and thus does not require compilation.
Macnotify is developed by Kevin Walzer and is available at http://opensource.codebykevin.com