Initial commit

This commit is contained in:
2016-12-26 20:54:28 +01:00
commit f9c2f8f543
8 changed files with 259 additions and 0 deletions

20
examples/find_windows.php Normal file
View File

@ -0,0 +1,20 @@
<?php
require_once __DIR__."/../vendor/autoload.php";
use NoccyLabs\X11\WindowList;
// Create a list of all windows
$windows = new WindowList();
$windows->dump();
// Select all the windows with a title matching *code*
$windows = $windows->visible()->find("*code*");
$windows->dump();
// Grab the first window
$window = $windows->first();
$window->dump();
// Focus the window and simulate F1 being pressed
$window->focus()->sendKeys("F1");