Bash scripting for right click

Hi All,

how do i write a bash script to mimic my right button click..

we have a design software which gives results based upon our conditon, and we can right click and it will show options to export as a particular file, As i want to do the above sequence for several iterations,

is there any way i can write a bash script for the above sequence?

is it possible? any ideas would be greatly appreciated.

if you guys want any more info or better explanation of the situation..do let me know...i just want an idea or a path to go to...

Thanks

Short answer: You probably can't
Long answer: bash scripts are (primarily) used to automate non-interactive commands for routine tasks. They know, by themselves, nothing of the X Window System, a mouse, or clicks.
What you need is some kind of X automation system, or a very very good book on C and the X protocol.

Thanks..but what if i used xev and capture the right click..can i use that in bash script to mimic the action.

any other ideas