Quote: "how can i draw a rectangle with the mouse?
i also need to keep it from drawing on the screen."
That's a little contradictory.
Here's the answer to your first question (assuming that I've guessed what you wanted correctly):
sync on
sync rate 0
autocam off
MouseDown = 0
X = 0
Y = 0
SC = 0x80ff0000 ` half alpha, full red
for i = 1 to 100
make object cube i, 1.0
position object i, rnd(100)-50, rnd(100)-50, 50
next
do
if mouseclick() = 1
if MouseDown = 0 ` Mouse clicked for the first time, so set start coords
MouseDown = 1
X = mousex()
Y = mousey()
endif
box X, Y, mousex(), mousey(), SC, SC, SC, SC
else
MouseDown = 0
endif
sync
loop
The selection within an area is a little more complex.
A way of doing it that immediately comes to my mind would be to generate an object with the shape of the volume selected - note that this is NOT a cube, but is a pyramidal frustum (a pyramid with the top cut off, with the top facing the camera), and it most probably has it's sides parallel to the camera viewing frustum (although I'd have to think about that a little more).