a global hook on all mouse messages that's going to call the python interpreter, looks like a performance nightmare! What you can do in a windows hook is very limited, certainly sending new messages wouldn't be part of it (you're already in the middle of a message being processed) What you would typically do is update a global variable and Invalidate() a status window, which will refresh itself eventually - and asynchronously. right now it's probably running a hundred thousand likes of code, with python, print (which routes to the log) and other things. that's too much and the crash can come from anywhere. I didn't follow the thread but if this is running in XSI, the hook will affect the whole of XSI.
On Thu, Oct 11, 2012 at 6:17 PM, Stefan Kubicek <s...@tidbit-images.com> wrote: > No I have not yet tried using a timer. I didn't even get to deal with Qt > related things, all I wanted for now was > a mouse hook that would print out "RMB pressed", "MMB pressed" and "LMB > pressed" respectively upon those events, but it crashes when I call > SetWindowsHookEx. See my example code attached to one of my previous mails. > It's essentially the exact same thing you are doing in C++. Yet it fails, > and my guts feeling is it's not my fault. > If that would work, the rest (the Qt-related part) should be relatively > straight forward. Famouse last words, I know.