471,338 Members | 1,044 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

Control mouse position and clicking

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
10 5365
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
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
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
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
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
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
I am running ubuntu. :)
Nov 29 '07 #8
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
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
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.

Similar topics

6 posts views Thread by Carlos García-Carazo | last post: by
15 posts views Thread by Tinus | last post: by
2 posts views Thread by Sam | last post: by
1 post views Thread by ohadasor | last post: by
7 posts views Thread by Joe-Paul Robb, Jr. | last post: by
13 posts views Thread by mirandacascade | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.