You can restrict the mouse with mouse.SetBounds, effectively trapping the mouse in a rectangle it can never leave.
Mouse.SetBounds(int left, int top, int right, int bottom)
Restricts the area where the mouse can move on screen. The four parameters are the relevant pixel co-ordinates of that edge of the bounding rectangle. They are in the usual range (0,0) - (320,200).
Object and GUI positions are set manually anyways, so I am not sure what kind of automation you are looking for.