I am playing around with Spy++ to see if I can intercept mouse events going to a SunAwtFrame (contained by a Java client, RuneLite, for the game RuneScape).
It is not going well however. The following is the window structure for RuneLite:
For all the above windows, Spy++ does not capture any events (mouse movements, clicks etc) despite me triggering them -- the messages list remains empty. I have verified that Spy++ works on my machine with other applications like MS Paint.
I speculate that the reason it fails is related to the fact that it is a Java canvas but I don't know. Might there be something intercepting the messages?
In a similar vain, I am unable to use the Win 32 API to send mouse events to the window (using SendMessage
, https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage).
If anyone is able to help me understand what's going on I would very much appreciate it :-)
- Why do I not see messages in Spy++? I am for other applications.
- Why am I unable to send messages using the Win 32 API? My code works for other appliations.