Hallo Tino,
On Sun, Jun 13, 2004 at 11:20:51AM +0200, Tino Schmidt wrote:
Wie kann ich für X Window (KDE) ein Programm schreiben, was in der Lage ist
einen Mausklick zu simulieren - welcher aber nicht als synthetisches Event
erkannt wird.
/* gcc -g -Wall -o click click.c -L /usr/X11R6/lib/ -lX11 -lXtst */
#include /* strcmp() */
#include
#include
int main( int argc, char *argv[] ) {
Display *dpy = XOpenDisplay( NULL );
if (argc == 1) {
XTestFakeButtonEvent( dpy, 1, True, CurrentTime );
XTestFakeButtonEvent( dpy, 1, False, CurrentTime );
} else if (argc == 2) {
XTestFakeButtonEvent( dpy, 3, True, CurrentTime );
XTestFakeButtonEvent( dpy, 3, False, CurrentTime );
}
XCloseDisplay( dpy );
return 0;
}
vielleicht reicht dir das schon.
Greetings Daniel
--
If all else fails, read the instructions. (LaTeX error help message)