Page 1 of 1

[Tool] Auto-Click script [Linux]

PostPosted: Fri Jun 26, 2015 08:47
by lisacvuk
Today I was playing a bit around Craig's server, and I needed some concrete for the ongoing railway project. So, I gone to my storage, took cobble and cactus, and cooked it all in microwaves. Then, after that, I had a full inventory of stone. I thought it would be nice if I could just click once and make it all concrete. So, I came up with this idea: why don't I bind 100 mouse clicks to a specific keyboard shortcut? So... I found out about a program called "xdotool". Moreover, it was inside Kubuntu 15.04 repositories. To install it, I just used:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt-get install xdotool

Then, I wrote this script:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
#!/bin/bash
xdotool click --repeat 100 1

Quite simple, huh?
It will click 100 times at the current mouse position. So, now we just need to make a keyboard shortcut that activates this script. In KDE, it is quite easy, just follow the pictures...
Image
Image
Image
Image
Image
I hope this helps anyone...

Re: [Tool] Auto-Click script [Linux]

PostPosted: Fri Jun 26, 2015 11:13
by Calinou
xdotool can do much more, see its command list:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
  getactivewindow
  getwindowfocus
  getwindowname
  getwindowpid
  getwindowgeometry
  getdisplaygeometry
  search
  selectwindow
  help
  version
  behave
  behave_screen_edge
  click
  getmouselocation
  key
  keydown
  keyup
  mousedown
  mousemove
  mousemove_relative
  mouseup
  set_window
  type
  windowactivate
  windowfocus
  windowkill
  windowclose
  windowmap
  windowminimize
  windowmove
  windowraise
  windowreparent
  windowsize
  windowunmap
  set_num_desktops
  get_num_desktops
  set_desktop
  get_desktop
  set_desktop_for_window
  get_desktop_for_window
  get_desktop_viewport
  set_desktop_viewport
  exec
  sleep

Re: [Tool] Auto-Click script [Linux]

PostPosted: Fri Jun 26, 2015 16:13
by lightonflux
There is also a proprietary GUI for that:

http://www.murguu.com/

Just for those who need it.