You are not logged in.

#1 2013-04-19 08:37:01

Pranavg1890
Member
From: Nagpur,India
Registered: 2012-09-07
Posts: 111

problem with xdotool bash script

Hi friends, I have some icons on the desktop i want them to be single clicked on startup. For that, i have created the following script:

xdotool mousemove 398 29
xdotool click 1
xdotool mousemove 229 18
xdotool click 1
xdotool mousemove 90 21
xdotool click 1
xdotool mousemove 89 115
xdotool click 1
xdotool mousemove 95 207
xdotool click 1
xdotool mousemove 90 302
xdotool click 1
xdotool mousemove 93 368
xdotool click 1
xdotool mousemove 101 464
xdotool click 1

xdotool should simply single-click each icon but unknowingly it double-clicks them and all the icons(i.e. all apps associated with them) start with it. xdotool click 1 should single-click the icons. guys can you tell what's wrong with it?

Last edited by Pranavg1890 (2013-04-19 08:37:53)


Using Openbox + Tint2 + Idesk

Offline

#2 2013-04-19 09:41:46

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,020
Website

Re: problem with xdotool bash script

I'm not sure if it's relevant to the problem described, but you really shouldn't be calling xdotool a dozen times; call it once and pass it a dozen commands.

You can even use a xdotool hash-bang to make an xdotool script.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#3 2013-04-19 10:14:35

Pranavg1890
Member
From: Nagpur,India
Registered: 2012-09-07
Posts: 111

Re: problem with xdotool bash script

Hi @Trilby, I tried writing all the commands in a file and then running that file with xdotool, but it gives me the same output. can someone please enlighten me on this problem?

Edit: I also tried passing all the commands to xdotool at once as said by Trilby but again the same output. It always double-clicks the icons after the second mousemove command. Please Help.Also, is there any other alternative to xdotool?

Last edited by Pranavg1890 (2013-04-19 10:20:36)


Using Openbox + Tint2 + Idesk

Offline

#4 2013-04-19 12:16:50

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,020
Website

Re: problem with xdotool bash script

OK, sorry I can't help beyond that - you are passing the right commands to xdotool.  I haven't used xdotool in a while myself.

If you're interested in alternatives, I made iocane, which does a subset of the things xdotool does.  It certainly should do what you intend.  I did, however, just realize I need to patch it up a bit, so I will be diving into it's code again over the weekend.  If you want to try it and suggest changes or report bugs, please do, and I should be able to get to them quickly.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

Board footer

Powered by FluxBB