Applescript, mouse click and more

Hello!
I 'm new to apllescript
I need FOR A NO PROFIT ASSOCIATION to make a
slide show ( Slide jpeg step by step with mouse click, es. with PhotoPresenter)
and at the end of slide presentation, on the next click, launch a “X” program.
Then the nex click this quit the program “X” and go to the first slide.

The computer is in open pubblic place and only click mouse (modified mice with only
click swith) is avaiable
I used the program Photo Presenter. I managed to start
it and do the slideshow but not at the end of slideshowing to start the program
“X”

Please help me step by step. Is not necessary that we should use
PhotoPresenter. I Use a Mac Mini MacOSx 10.4

Tell me a good solution. Thank you very much from Italy

Thanks & Merry Christmas

Claudio Giri