USB Absolute Mouse Mode

Here is an example sketch that uses the random fuction to set mouse coordinates.
It uses a "high" input to pin 2 to activate

void setup(){
pinMode(2, INPUT);
}

void loop(){
int x;
int y;

if(digitalRead(2) == HIGH){
Mouse.begin();
for(int z = 1; z <= 10; z++){
x = random(0, 100);
y = random(0, 100);
Mouse.move(x, y);
delay(100);
}
Mouse.end();
}
}