Mouse manipulation

A

arkestra

I am writing a script that interacts with the computer screen.

Is there a module (either built in or add on) that would allow the
script to manipulate the mouse pointer ? -- eg right click, move two
pixels to the right, left click etc?

thank you.
 
F

fraca7

arkestra a écrit :
I am writing a script that interacts with the computer screen.

Is there a module (either built in or add on) that would allow the
script to manipulate the mouse pointer ? -- eg right click, move two
pixels to the right, left click etc?


Under Windows, see the SendInput Win32 function (use win32all). Under
Linux, you can write a C binding for the XTest extension.
 
R

Rinzwind

arkestra schreef:
I am writing a script that interacts with the computer screen.

Is there a module (either built in or add on) that would allow the
script to manipulate the mouse pointer ? -- eg right click, move two
pixels to the right, left click etc?

thank you.

pygame is able to do that.
 
P

Peter Hansen

Rinzwind said:
arkestra schreef:

pygame is able to do that.

Do you happen to know which of Pygame's packages allow that? I've
searched the docs and Googled for it but it doesn't seem obvious to me
which supports that functionality. (Is it done by posting native events
to the event queue, or is there more direct support? An example or a
link to relevant background info would be appreciated.)

-Peter
 
A

arkestra

I have found something that is similar to what I was looking for -->the
SendKeys module.

But what I am realy looking for is the same thing, but for the mouse :)

Thanks again.
 
A

arkestra

I posted too soon. I installed win32all and the missing dll for 4.2

win32api.SetCursorPos((1,2)) does it!

Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,179
Messages
2,570,956
Members
47,509
Latest member
Jack116

Latest Threads

Top