You could use xnee to record your mouse action and replay it later when needed.
There's a gui for it called gnee
. I didn't have very good results with it last time i tried but that was a long time ago, things might have changed since then.
Here's what i used for the recording:
$ sleep 2 ; xmessage ready ; sleep 1 ; cnee --record --mouse --keyboard -o cnee.data
This lets you move around and prepare things before starting. Click ok
when you're ready, wait 1s and do your action. Ctrl-c when you're done.
Then you can replay it with:
$cnee --replay -f cnee.data -v -e /dev/null -ns
You can even replay it faster than the original (!)
$cnee --replay --speed-percent 40 -f cnee.data -v -e /dev/null -ns
You'll probably have to edit out the end of cnee.data
to get rid of what you did in between your action and the Ctrl-c.