Skip to content

Instantly share code, notes, and snippets.

Avatar

Windy Player windyweather

  • Oregon, USA
View GitHub Profile
@windyweather
windyweather / ImpressShowRunner_StartStopShows.java
Created Apr 21, 2020
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.
View ImpressShowRunner_StartStopShows.java
public void startShowPlaying( String sImpress, String sOptions, String sShowPath ) {
if ( bShowRunning ) {
System.out.println("startShowPlaying already running");
return;
}
String cmdString = sImpress +" "+sOptions+" "+sShowPath;
try {
pShowProcess = Runtime.getRuntime().exec( cmdString );
@windyweather
windyweather / ImpressShowRunner_TimerCode.java
Last active Apr 21, 2020
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.
View ImpressShowRunner_TimerCode.java
//
// a timer task to tick down the time
// up the tics and click the mouse
//
private class MyTimerTask extends TimerTask {
@Override
public void run()
{
nTimerTics++;
tfTimerTics.setText(String.valueOf(nTimerTics));
@windyweather
windyweather / runshows.bash
Created Apr 10, 2020
Example Bash Script that will run a series of LibreOffice Impress slideshows in an infinite loop.
View runshows.bash
#!/bin/bash
# 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
do
@windyweather
windyweather / X11MouseClick.cpp
Created Apr 9, 2020
X11MouseClick code sample from a Linux Qt application
View X11MouseClick.cpp
//
// Let's try the more straightforward X11 API to click the mouse
// This example code was harvested from the internet
//
// https://www.linuxquestions.org/questions/programming-9/simulating-a-mouse-click-594576/
//
// Another link is here
// https://stackoverflow.com/questions/27984220/x11-sending-a-mouse-click-without-moving-a-pointer
#include <QMainWindow>