Seite 1 von 1

Python + Maus

Verfasst: Freitag 10. Januar 2003, 09:51
von akIra
Heya,
gibt es die Möglichkeit in Python (möglichst ohne tk), die Position der Maus zu ermitteln und/oder selbst festzulegen ?

Merci,
akI

[Win2k, Python 2.2]

Re: Python + Maus

Verfasst: Freitag 10. Januar 2003, 11:40
von Voges
Geht unter Windows denkbar einfach:

>>> import win32api
>>> win32api.GetCursorPos()
(1272, 1008)
>>> win32api.SetCursorPos((10,10))
>>>


Du brauchst aber die Windows-Extentions (bei ActivePython schon dabei, sonst unter http://starship.python.net/crew/mhammon ... loads.html zu bekommen).

Jan