Skip to content

Instantly share code, notes, and snippets.

View windyweather's full-sized avatar

Windy Player windyweather

  • Oregon, USA
View GitHub Profile
windyweather /
Created April 21, 2020 18:07
Sample code shows how to launch an Impress slide show and stop it. Uses Timer routines in another gist. Works on Windows 10 and Linux Mint 19.
public void startShowPlaying( String sImpress, String sOptions, String sShowPath ) {
if ( bShowRunning ) {
System.out.println("startShowPlaying already running");
String cmdString = sImpress +" "+sOptions+" "+sShowPath;
try {
pShowProcess = Runtime.getRuntime().exec( cmdString );
windyweather /
Last active April 21, 2020 18:04
Java code from example showing use of Timer and Robot to click mouse to eventually stop a running Impress Slide Show. Works on Windows 10 and Linux Mint 19.
// a timer task to tick down the time
// up the tics and click the mouse
private class MyTimerTask extends TimerTask {
public void run()
windyweather / runshows.bash
Created April 10, 2020 04:03
Example Bash Script that will run a series of LibreOffice Impress slideshows in an infinite loop.
# wait for the show named soffice to finish
# keep clicking the mouse until it ends.
function waitforshow {
sleep 5
echo "Clicking the mouse and waiting for show to end. Ctrl/C to Exit"
while pgrep soffice > /dev/null 2>&1
windyweather / X11MouseClick.cpp
Created April 9, 2020 20:32
X11MouseClick code sample from a Linux Qt application
// Let's try the more straightforward X11 API to click the mouse
// This example code was harvested from the internet
// Another link is here
#include <QMainWindow>