LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-29-2003, 06:27 PM   #1
danielw
Member
 
Registered: Jul 2003
Location: Australia
Distribution: CRUX
Posts: 35

Rep: Reputation: 15
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.
 
Old 08-30-2003, 05:55 PM   #2
danielw
Member
 
Registered: Jul 2003
Location: Australia
Distribution: CRUX
Posts: 35

Original Poster
Rep: Reputation: 15
Please help :/
 
Old 08-31-2003, 02:12 AM   #3
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
Try out Xmacro. Looks like beta software so good luck!
 
Old 09-02-2003, 02:23 AM   #4
danielw
Member
 
Registered: Jul 2003
Location: Australia
Distribution: CRUX
Posts: 35

Original Poster
Rep: Reputation: 15
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?
 
Old 09-02-2003, 02:32 AM   #5
danielw
Member
 
Registered: Jul 2003
Location: Australia
Distribution: CRUX
Posts: 35

Original Poster
Rep: Reputation: 15
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
 
Old 09-02-2003, 02:41 AM   #6
danielw
Member
 
Registered: Jul 2003
Location: Australia
Distribution: CRUX
Posts: 35

Original Poster
Rep: Reputation: 15
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.
 
Old 09-02-2003, 03:52 AM   #7
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
Congrats danielw! Thanks for posting your results.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mouse third button scroll problem/ reboot command help madiyaan Linux - Newbie 5 03-16-2005 10:13 AM
how to mouse configuration from command line blastradius Slackware 1 02-23-2005 02:56 PM
mapping Logitech mouse thumb button to double-click buldir Linux - Hardware 3 12-04-2004 09:11 PM
Assigning 'double-click' to a specific mouse button theMonkeY Linux - Hardware 1 09-06-2004 07:11 AM
middle mouse button is paste.. but what if i dont have a mid mouse button? kublador Linux - Newbie 4 09-02-2003 08:59 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration