[Tutor] Mouseclick

Øyvind python at kapitalisten.no
Tue Apr 5 22:18:47 CEST 2005


I am creating a little application that demonstrates some tasks on the
screen for the user, but cannot seem to click the left mousebutton.

I have moved the cursor to the correct position by

>>> from ctypes import *
>>> windll.user32.SetCursorPos(100, 400)

and would like to click the left mousebutton at that position. Is that
possible? I have just been able to find ways to click the button on
buttons that I can name such as:

def findAButtonCalledOK(hwnd, windowText, windowClass): # Define a
function to find our button
    return windowClass == "Button" and windowText == "OK"
okButton = findControl(optDialog, findAButtonCalledOK)
click(okButton)

or how to track if a button is pressed. But neither of those are what I
need. I need to press the button at a specific coordinate... Can I do that
with Python? If so, how? 3 hours of Googling didn't help me....

Thanks in advance...

-- 
This email has been scanned for viruses & spam by Decna as - www.decna.no
Denne e-posten er sjekket for virus & spam av Decna as - www.decna.no



More information about the Tutor mailing list