You could say...
If Object Screen X([obj#]) < MouseX() + [X size value] and Object Screen X([obj#]) > MouseX() - [X size value]
If Object Screen Y([obj#]) < MouseY() + [Y size value] and Object Screen Y([obj#]) > MouseY() - [Y size value]
ObjSelected=1
Endif
Endif
Well... I hope I helped
[Edit...]
If you want to find which object is under the mouse you could use a For...Next Loop
For Obj = [min objnumber] to [max objnumber]
If Object Screen X(obj) < MouseX() + [X size value] and Object Screen X(obj) > MouseX() - [X size value]
If Object Screen Y(obj) < MouseY() + [Y size value] and Object Screen Y(obj) > MouseY() - [Y size value]
ObjSelected=obj
Ghost Object On obj
Endif
Endif
Next Obj
Thou shalt not thwart the way of the dragon. For thou tasteth like chicken.