LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Command line way to click a mouse button. (https://www.linuxquestions.org/questions/linux-general-1/command-line-way-to-click-a-mouse-button-87121/)

danielw 08-29-2003 06:27 PM

Command line way to click a mouse button.
 
Hi, I was just wondering if any of yous happened to know a way to click certain mouse buttons in X by executing a command in the shell. I have tried a few windows programs through wine that perform this function but they all seem to try and click in corner, and not where I aim the curser at.

Also, if you know of any linux programs that perform this function I would greatly appreciate it.

danielw 08-30-2003 05:55 PM

Please help :/

footfrisbee 08-31-2003 02:12 AM

Try out Xmacro. Looks like beta software so good luck!

danielw 09-02-2003 02:23 AM

Hey thanks for the reply. I gave Xmacro a whirl and it's been almost been 2 years since they updated it, looks like work has stopped.

It seems pretty hard to use. I just want to know how to record a macro without it making my mouse go all funny. I've got no idea how to use it really...

I could probably create a script, but how do I pass that through xmacro to run it?

Could anyone else give it a try and see what they come up with?

danielw 09-02-2003 02:32 AM

Okay, I know exactly what I want to perform with this program.

So say if I have a file called 'mouse.scr' with the following lines:

----
MotionNotify 339 486
ButtonPress 1
ButtonRelease 1
----

How would I parse that information to xmacroplay and have it loop (I assume there is someway to make a bash script loop, is there not?)

Any help is always appreciate :)

danielw 09-02-2003 02:41 AM

HURRAY

I discovered this for myself so I'm quite happy :)
Here's what I did:

----
$ cat mouse.scr | xmacroplay :0
----

And it worked!

Now to read up more on bash scripting and find this loop I'm looking for.

footfrisbee 09-02-2003 03:52 AM

Congrats danielw! Thanks for posting your results.


All times are GMT -5. The time now is 05:21 PM.