This Plug in Action by @ComplexPoint does exactly that (and there is a companion Plug in Action that grabs the coordinates of a positioned Palette).
For more information, see the wiki Searching the Forum for Answers section.