A very useful tool for doing what you need and other X related tasks is xdotool
You can install it directly from the repos (sudo apt-get install xdotool for deb/ubuntu)
Go to the shell and type the following to move the mouse:
Code:
xdotool mousemove 300 400
where 300 and 400 are the x/y coordinates.
Check out the man pages (or man xdotool) for more details on moving/resizing windows, automatically typing etc.