By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,036 Members | 1,963 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,036 IT Pros & Developers. It's quick & easy.

Control mouse position and clicking

P: n/a
hi, how can I, control mouse position and clicking from python?

I want to interact with a flash application inside firefox. thanks.

ps: I am not using windows.
Nov 28 '07 #1
Share this Question
Share on Google+
10 Replies


P: n/a
On Nov 28, 1:29 pm, Glich <Glich.Gl...@googlemail.comwrote:
hi, how can I, control mouse position and clicking from python?

I want to interact with a flash application inside firefox. thanks.

ps: I am not using windows.
Ooof, I was about to suggest using pywinauto, because I was able to
interact with a flash app with that module, until I saw your p.s.

So even though you are not using windows and can't use this technique
directly, I am just posting to give you some encouragement that, at
least theoretically, such a thing can be done.

-- Paul
Nov 28 '07 #2

P: n/a
Paul McGuire wrote:
On Nov 28, 1:29 pm, Glich <Glich.Gl...@googlemail.comwrote:
>hi, how can I, control mouse position and clicking from python?

I want to interact with a flash application inside firefox. thanks.

ps: I am not using windows.

Ooof, I was about to suggest using pywinauto, because I was able to
interact with a flash app with that module, until I saw your p.s.

So even though you are not using windows and can't use this technique
directly, I am just posting to give you some encouragement that, at
least theoretically, such a thing can be done.
It is for sure - VNC server does that.

It might be a (very bad) solution to install a VNC server on one
computer, and controll it from Windows using a VNC client. (It works but
it was a joke, of course...)

Laszlo

Nov 28 '07 #3

P: n/a
Glich wrote:
hi, how can I, control mouse position and clicking from python?

I want to interact with a flash application inside firefox.
thanks.

ps: I am not using windows.
On Mac, IIRC, you can't.

Regards,
Björn

--
BOFH excuse #394:

Jupiter is aligned with Mars.

Nov 28 '07 #4

P: n/a
On Nov 28, 9:33 pm, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n...@spamgourmet.comwrote:
snip
>
On Mac, IIRC, you can't.

Regards,
well, you can do it from Java, (the Robot class, as I recall), so you
should be able to do it in Jython, which is a Python implementation,
so....

Tony

Nov 28 '07 #5

P: n/a
On Nov 28, 9:33 pm, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n...@spamgourmet.comwrote:
snip
>
On Mac, IIRC, you can't.

Regards,
well, you can do it from Java, (the Robot class, as I recall), so you
should be able to do it in Jython, which is a Python implementation,
so....

Tony

Nov 28 '07 #6

P: n/a
Tony wrote:

[place mouse programmatically]
well, you can do it from Java,
Are you absolutely positive? IIRC the Mac UI guidelines forbid such
things, and there's no API function for it; so Java wouldn't have
any chance.

Regards,
Björn
--
BOFH excuse #136:

Daemons loose in system.

Nov 29 '07 #7

P: n/a
I am running ubuntu. :)
Nov 29 '07 #8

P: n/a
Glich wrote:
hi, how can I, control mouse position and clicking from python?

I want to interact with a flash application inside firefox. thanks.

ps: I am not using windows.
I've use the external program xte with some success if you don't send it too
many events too quickly. I start it using subprocess and feed it commands. On Ubuntu

sudo apt-get install xautomation

It uses the XTest extension for X11 to send mouse events to the system. One
could probably easily wrap the xlib API for it using ctypes so you wouldn't have
to bother with an external program.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Nov 29 '07 #9

P: n/a
Glich wrote:
I am running ubuntu. :)
I neither asserted differently nor am I competent in clairvoyance.

Regards,
Björn

--
BOFH excuse #93:

Feature not yet implemented

Nov 29 '07 #10

P: n/a
Robert Kern wrote:
There is an API for it. Not all programs have GUIs so the HIG
doesn't restrict the scope of the OS's APIs.
Ah, okay. In (IIRC) wxPython docs, I read differently.

Regards,
Björn

--
BOFH excuse #40:

not enough memory, go get system upgrade

Nov 29 '07 #11

This discussion thread is closed

Replies have been disabled for this discussion.