I'm having an error while compiling this function I found
1º ErrorCode:void mouseClick(int button){ Display *display = XOpenDisplay(NULL); XEvent event; if(display == NULL) { fprintf(stderr, "Error en la apertura del display \n"); exit(EXIT_FAILURE); } memset(&event, 0×00, sizeof(event)); -> 1º Error here event.type = ButtonPress; event.xbutton.button = button; event.xbutton.same_screen = True; XQueryPointer(display, RootWindow(display, DefaultScreen(display)), &event.xbutton.root, &event.xbutton.window, &event.xbutton.x_root, &event.xbutton.y_root, &event.xbutton.x, &event.xbutton.y, &event.xbutton.state); event.xbutton.subwindow = event.xbutton.window; while(event.xbutton.subwindow){ event.xbutton.window = event.xbutton.subwindow; XQueryPointer(display, event.xbutton.window, &event.xbutton.root, &event.xbutton.subwindow, &event.xbutton.x_root, &event.xbutton.y_root, &event.xbutton.x, &event.xbutton.y, &event.xbutton.state); } if(XSendEvent(display, PointerWindow, True, 0xfff, &event) == 0){ fprintf(stderr, "Error al enviar el evento \n"); } XFlush(display); usleep(100000); event.type = ButtonRelease; event.xbutton.state = 0×100; -> 2º Error Here if(XSendEvent(display, PointerWindow, True, 0xfff, &event) == 0){ fprintf(stderr, "Error al enviar el evento \n"); } XFlush(display); XCloseDisplay(display); }
keyfunc.c:33: error: ‘\303’ parasite in the program
keyfunc.c:33: error: ‘\227’parasite in the program
keyfunc.c:33: error: expected ‘)’ before numeric constant
keyfunc.c:33: error: faltan argumentos para la función ‘memset’
2º Error
keyfunc.c:55: error: ‘\303’ parasite in the program
keyfunc.c:55: error: ‘\227’ parasite in the program
keyfunc.c:55: error: expected ‘;’ before numeric constant
Any help?
I think it is because of the 0×00..
Thanks in advice



LinkBack URL
About LinkBacks


