Thankyou very much, that looks exactly like what I needed!
And it's in the manual too, but when I first saw that function I discarded it because I thought it wouldn't work if it was over a button or some other elemnent of a window.

But I just did a test and it works perfectly no matter what element of the windows it is over. here is an example for anyone else that might run into this problem in the future:
Code:
if((mouse_left)&&(LBG_mouse_window()==0))
{
   //shoot,create,select,etc... whatever you want
}




"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1