The way I would do it with script:
I would use the CurrentDisplay.DrawTile Method to draw all the tiles for the box. First make a tileset a vertical and horizontal line going through the middle of the tile. You would want the tileset relatively small to match the smallest possible box you want to make. (16x16?)
I like this method because its clean, and there are no sprites to clean up, or dynamic layers to worry about, and you can do it all in one event I beleive, either onmouse move or onafterspritesmove.
Ill even write you a little Psudo Code for the draw box part only:
OnMousemove 'Or every frame??
'if mouse button1 is depressed:
'make sure mouse is to the lower right of starting point, if not... do something to make it not screw up :P
For i = startX-screenscrollX to mouseX step 16
' if last Column to draw, do something to adjust x value to the left to match up corners
CurrentDisplay.DrawTile HorizontalTile, i, startY-ScreenscrollY - 8
CurrentDisplay.DrawTile HorizontalTile, i, MouseY + 8
For j = startY-ScreenscrollY to MouseY step 16
' if last Row to draw, do some adjust y value to the -y to match up corners
CurrentDisplay.DrawTile VerticalTile,startX-screenscrollX - 8, j
CurrentDisplay.DrawTile VerticalTile,mouseX + 8, j
Next j
Next i
else if mousebutton isnt depressed but was last frame:
Call select units
end if