[BangPypers] moving/clicking the mouse cursor using python
Anand Balachandran Pillai
abpillai at gmail.com
Fri Jan 7 12:34:50 CET 2011
On Fri, Jan 7, 2011 at 4:54 PM, Narendra Sisodiya <
narendra at narendrasisodiya.com> wrote:
> On Fri, Jan 7, 2011 at 4:48 PM, Anand Balachandran Pillai
> <abpillai at gmail.com> wrote:
> > You should be using ncurses for applications like this which need mouse
> > positions (x,y) on the console.
> > http://pyncurses.sourceforge.net/
> What will be the difference ? can I use pyncurses to generate global
> mousemovement ? like the way i did with xdotool.
> Also, What about Windows/Mac Platform ?
Not sure what you mean by global, but ncurses turns your console
into a matrix of x,y positions. It was widely used to provide a console
interface to cli programs in the 90s, (I am reminded of my old favorite
program "mikmod" for playing module music), but much less used
now a days.
I didn't read your post fully. If you want to generate clicks anywhere on
desktop, ncurses won't work since it is tied to a terminal.
You could try something like
See some discussion of this on
Regarding ncurses, yes it will work on any console/terminal which supporse
That includes darwin (mac os x) and cygwin on windows. But of course not the
> > Please don't use X like the way you did in the 2nd approach, *nix
> > really can do better than that. This ain't 1999 you know.
> Thanks for tip, but I never write such code so i am asking.
> > --Anand
More information about the BangPypers