I wrote a Java applet for you. It will move the mouse cursor one pixel to the right and back every 59 seconds, effectively preventing the screen from shuttering.
, - createRobot , Robot. , .
import java.applet.Applet;
import java.awt.*;
import java.util.Timer;
import java.util.TimerTask;
public class ScreenSaverDisablerApplet extends Applet {
private static final int PERIOD = 59;
private Timer screenSaverDisabler;
@Override
public void start() {
screenSaverDisabler = new Timer();
screenSaverDisabler.scheduleAtFixedRate(new TimerTask() {
Robot r = null;
{
try {
r = new Robot();
} catch (AWTException headlessEnvironmentException) {
screenSaverDisabler.cancel();
}
}
@Override
public void run() {
Point loc = MouseInfo.getPointerInfo().getLocation();
r.mouseMove(loc.x + 1, loc.y);
r.mouseMove(loc.x, loc.y);
}
}, 0, PERIOD*1000);
}
@Override
public void stop() {
screenSaverDisabler.cancel();
}
}