Getting cursor position in Python

后端 未结 11 1174
旧巷少年郎
旧巷少年郎 2020-12-02 22:29

Is it possible to get the overall cursor position in Windows using the standard Python libraries?

11条回答
  •  无人及你
    2020-12-02 23:13

    You will not find such function in standard Python libraries, while this function is Windows specific. However if you use ActiveState Python, or just install win32api module to standard Python Windows installation you can use:

    x, y = win32api.GetCursorPos()
    

提交回复
热议问题