Results 1 to 1 of 1
  1. #1
    RayLewis
    RayLewis is offline
    Guest
    Join Date
    2013 Apr
    Posts
    1
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    Faking Mouse Clicks (Linux)

    Hello all,

    I was digging through my tutorials for something a bit more obscure than all the other stuff here.

    I don't take credit for this tutorial but I don't know who wrote it originally, it was in a big zip of tutorials I got.

    Basically, this allows you to simulate mouse clicks in Linux.

    You might have to link against libXtst.so

    Code:
    #include <X11/extensions/XTest.h>
    
    Display *TheXDisplay;
    
    TheXDisplay = XOpenDisplay(NULL); // Get current x display
    
    XTestFakeButtonEvent(TheXDisplay, 1,true,0);  // Left mouse down
    XTestFakeButtonEvent(TheXDisplay, 1,false,0);  // Left mouse up
    
    XFlush(TheXDisplay);  // Push all queued events out
    
    XCloseDisplay(TheXDisplay); // Close display
    Good luck.

Similar Threads

  1. [Tutorial] Como fazer para o mouse para de travar AikaBr|How to make the mouse to catch AikaBr
    By sabakonogara in forum Aika Bots, Hacks, Cheats
    Replies: 0
    Last Post: 2013-07-18, 07:35 PM
  2. [Tutorial] Aika on Ubuntu 13.04 (linux)
    By SataSSD in forum Aika Guides, Tutorials
    Replies: 1
    Last Post: 2013-06-16, 01:54 AM
  3. [Source] Block right mouse Button!
    By hirudora in forum Web, PHP
    Replies: 2
    Last Post: 2012-10-04, 06:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •