Objects under mouse pointer

Hello!

Is it possible to get the top most object under the mouse pointer regardless where it is? Example: my script needs to know if the mouse is over a specific dock icon or over an icon of a folder or over a window of another app.

TIA