I am trying to write a program that requires to know if a window is being dragged (moved around). The catch is that it's not the program's window, but rather any window in the OS (eg. Safari, iTunes, Adium, TextMate, etc.), and what program it belongs to
I was thinking AppleScript would be a potential way to do this, but there doesn't seem to be anyway to know whether it's being dragged.
Any ideas?