I have a MacBook that prints to a shared Windows 7 printer. Sometimes the Windows machine is asleep, and the Mac will just queue up its print requests. I recently created a script to send a wake-on-lan packet to a Windows 7 machine. This wakes up the Windows machine and printing starts. Great, but I think the system can be automated some.
Is it possible to have the MacBook run the wake-on-lan script everytime something is printed? Stated more generally, can I have the OS X print subsystem execute a script everytime something is printed?