#!/bin/bash
pkill -u adahmane xpaint
sleep 1
/bin/xpaint -canvas &
 
sleep 2
xte "mousemove 100 200"
xte "mousedown 1"
 
y=200;for((x=100;x<150;x=x+1));do
xte "mousemove $x $y"
done
 
x=150;for((y=200;y<250;y=y+1));do
xte "mousemove $x $y"
done
 
y=250;for((x=150;x>100;x=x-1));do
xte "mousemove $x $y"
done
 
x=100;for((y=250;y>200;y=y-1));do
xte "mousemove $x $y"
done
 
xte "mouseup 1"
 
xte "mousemove 150 250"
 
xte "mousedown 1"
 
x=125;for((y=250;y<350;y=y+1));do
xte "mousemove $x $y"
done
 
y=350
for((x=125;x<150;x=x+1));do
xte "mousemove $x $y"
let y=$y+1
done
 
xte "mouseup 1"
 
xte "mousemove 525 100"
xte "mouseclick 1"
xte "mousemove 150 480"
xte "mouseclick 1"
xte "mousemove 50 50"
xte "mouseclick 1"
xte "mousemove 110 210"
xte "mouseclick 1"