[SOLVED] API Spy / Handle Finder for external Apps

Ayelwen

Reputable
Jan 21, 2016
14
0
4,510
So, way back when, we're talking DialUp internet, AOL and Yahoo Chat days, I used to teach myself VisualBasic 6. There was a little tool with a (+) cross hair that would give you the handler to access a window you clicked on. You could use that information to provide input to that window. Such as typing text in a window when it doesn't have focus, or buttons, etc. That was easily 20 years ago. I'm trying to find the modern day equivalent. To write an app that types into a text box that is not my app. So I could be playing a game and on pressing a button in either a C#.Net or VB.Net app, it could send text to a chat in another window. (Example)
 
Solution
Handles usually change each time the window is created as far as I know. So use the API to get the handle of the window you want. There's the GetWindow() function. GetActiveWindow() is another. There's also the EnumWindows() callback which lets you loop through all the windows until you find the right one to retrieve the handle.

WinSpy is a common tool used today to find handles. Try this one: https://sourceforge.net/projects/winspyex/
Use the tool at the top, drag it to a window and drop it.

gardenman

Splendid
Moderator
Handles usually change each time the window is created as far as I know. So use the API to get the handle of the window you want. There's the GetWindow() function. GetActiveWindow() is another. There's also the EnumWindows() callback which lets you loop through all the windows until you find the right one to retrieve the handle.

WinSpy is a common tool used today to find handles. Try this one: https://sourceforge.net/projects/winspyex/
Use the tool at the top, drag it to a window and drop it.
 
Solution