xdotool utilized.
This commit is contained in:
parent
07555845a1
commit
a282a95c4e
@ -337,31 +337,36 @@ public class GUI
|
|||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
try
|
Miscellaneous.runExternalApplication("/usr/bin/xdotool key ctrl", 0, null, null);
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Move the mouse cursor
|
|
||||||
*
|
|
||||||
* Using this amount of movements has proven relatively reliable.
|
|
||||||
* Using less has not always woken up the screen or only woke it
|
|
||||||
* up, but did not also unblank it, resulting in a well-lit, but
|
|
||||||
* still black screen.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Robot robot = new Robot();
|
|
||||||
for(int xCoord = 500; xCoord < 550; xCoord++)
|
|
||||||
for(int yCoord = 500; yCoord < 550; yCoord++)
|
|
||||||
robot.mouseMove(xCoord, yCoord);
|
|
||||||
}
|
|
||||||
catch(Exception e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}});
|
}});
|
||||||
|
|
||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void moveMouseCursor()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Move the mouse cursor
|
||||||
|
*
|
||||||
|
* Using this amount of movements has proven relatively reliable.
|
||||||
|
* Using less has not always woken up the screen or only woke it
|
||||||
|
* up, but did not also unblank it, resulting in a well-lit, but
|
||||||
|
* still black screen.
|
||||||
|
*/
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Robot robot = new Robot();
|
||||||
|
for(int xCoord = 500; xCoord < 550; xCoord++)
|
||||||
|
for(int yCoord = 500; yCoord < 550; yCoord++)
|
||||||
|
robot.mouseMove(xCoord, yCoord);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void getFocus()
|
void getFocus()
|
||||||
{
|
{
|
||||||
java.awt.EventQueue.invokeLater(new Runnable()
|
java.awt.EventQueue.invokeLater(new Runnable()
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user