This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); |