
We recently proved that Java desktop programs can be easily deployed to Windows and Linux. Now we have proved that other complex parts of the program to run a series of Impress Shows in a loop.
- Running the command line to launch the Impress program to show the slide show.
- Finding out when the show is complete.
- Clicking the mouse repeatedly so that the show ends when it finally reaches the black screen.
1 and 2 are pretty easy. In Qt there is a class that executes a command in another process. And you can wait on it or check to see if it is complete. We can’t wait of course since Impress just waits forever for a click on a black screen at the end. Soooo.
3 is not so easy on Qt. The solution differs by OS. On windows you need to call the Kernel to send events to be dispatched through the event handler. UINPUT calls. On Linux, the easiest solution I found was to launch the “xtodo click 1” command to perform a mouse click. The xtodo command is easily installed on Linux, but this is another step to make the program work. But the Java solution is much easier.