0

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:

Spy++ overview

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.
Terry T
  • 109
  • 2
  • 7
  • I don't have an answer to the question (since I don't understand it), but the solution to your actual problem, in all likeliness, is [UI Automation](https://learn.microsoft.com/en-us/windows/win32/winauto/entry-uiauto-win32). – IInspectable Jan 21 '23 at 16:56
  • Thanks for the suggestion! Unfortunately I don't think UI automation is the way to go here. I have updated my question to hopefully clarify a few things. – Terry T Jan 21 '23 at 17:04

0 Answers0