Re: [python-win32] hook the left mouse button down event on any window

2019-03-30 Thread Tim Roberts
On Mar 29, 2019, at 8:39 PM, Zhao Lee wrote: > > import win32gui > import win32ui > import win32con > > def onMousePressed(self): > print('onMousePressed', win32gui.GetCursorPos()) > > def listener(): > windowHandle = win32gui.WindowFromPoint(win32gui.GetCursorPos()) > clickedWindow

Re: [python-win32] hook the left mouse button down event on any window

2019-03-29 Thread Zhao Lee
Thanks for reply! My code is well formated at https://stackoverflow.com/questions/55399565/hook-the-left-mouse-button-down-event-on-any-window or the following : import win32gui import win32ui import win32con def onMousePressed(self): print('onMousePressed', win32gui.GetCursorPos()) def

Re: [python-win32] hook the left mouse button down event on any window

2019-03-29 Thread Tim Roberts
Zhao Lee wrote: I originally posted the question here , please help ,thank you ! I want to hook the left mouse button down event on any window, my code as following : |importwin32guiimportwin32u

[python-win32] hook the left mouse button down event on any window

2019-03-28 Thread Zhao Lee
I originally posted the question here , please help ,thank you ! I want to hook the left mouse button down event on any window, my code as following : import win32guiimport win32uiimport win32condef onMousePressed(self): print('onMousePressed', win32gui.GetCursorPos())def listener(): w