#!/bin/bash
 
/bin/xpaint -canvas &
 
xte "sleep 2"
 
xte "mousemove 100 200"
y=200;for((x=100;x<150;x=x+1));do
xte "mousedown 1"
xte "mousemove $x $y"
xte "mouseup 1"
done
 
x=150;for((y=200;y<250;y=y+1));do
xte "mousedown 1"
xte "mousemove $x $y"
xte "mouseup 1"
done
 
y=250;for((x=150;x>100;x=x-1));do
xte "mousedown 1"
xte "mousemove $x $y"
xte "mouseup 1"
done
 
x=100;for((y=250;y>200;y=y-1));do
xte "mousedown 1"
xte "mousemove $x $y"
xte "mouseup 1"
done