Simulate button 3 to another program - Motif

This is a discussion on Simulate button 3 to another program - Motif ; Does anyone have some example code/pseudocode of how I could simulate a right mouse click from one program to another? I know I need to use XSendEvent, but all my attempts at using it never work. Thanks in advance! -- ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Simulate button 3 to another program

  1. Simulate button 3 to another program

    Does anyone have some example code/pseudocode of how I could simulate a
    right mouse click from one program to another? I know I need to use
    XSendEvent, but all my attempts at using it never work.

    Thanks in advance!
    --

    Joey

    +--------------------------------------------------------------------------+
    + +
    + Joey Mukherjee "The price of freedom is eternal +
    + joey@swri.org vigilance, or $12.50 as seen on +
    + eBay... +
    + +
    +--------------------------------------------------------------------------+


  2. Re: Simulate button 3 to another program

    Joey Mukherjee wrote:

    > Does anyone have some example code/pseudocode of how I could simulate a
    > right mouse click from one program to another? I know I need to use
    > XSendEvent, but all my attempts at using it never work.
    >
    > Thanks in advance!


    I dont think you can, for obvious security reasons. You can implement a
    special-purpose protocol between the 2 programs, using sockets and
    XtAppAddInput. Or you could look in the sources for xmon, xscript,
    xwininfo, xprop, to see how they access windows ownded by other
    programs. A way to achieve what you want might be to do what xscript
    does to 'send' to the target program a keyboard sequence for which you
    would assign the same translation as right-click.

    HTH,
    --
    Michel Bardiaux
    Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
    Tel : +32 2 790.29.41


+ Reply to Thread