
NET we can call Win 32 API using platform Interop Services, which resides at namespace. Other languages just act as a shell to provide an automated and easier way to access APIs. It is something like the native code of Windows. Every user action causes the execution of several or more API function telling Windows what's happened. Now you might have question in your mind that What is API?ĪPI (Application Program Interface) is a set of predefined Windows functions used to control the appearance and behavior of every Windows element (from the outlook of the desktop window to the allocation of memory for a new process). Using these API you can perform direct operation in windows, which increases performance of your application. I had to do it this way because FindWindowEx requires knowledge of both the window class name AND window titles, but the desired static text controls change their captions.Īnd if I already knew those captions, then I would have no need for any of this functionality in the first place.Windows exposes lots of functionality in the form of Win32 API.

So I just used FindWindow on each root node of the target control, then used EnumChildWindows on that window handle to get the correct child control window handles. Print(format("Window Handle: %d, Caption: \"%s\"", parentWindow, text))īut now I'm having trouble getting the HWND of the static label control belonging to the parent HWND, since FindWindowEx returns 0 when I use the parent HWND to search for a child control.Īnyone know of an alternative to grabbing the HWND of a child conrtol?įindWindowEx only returns child windows 1 level down from the parent window, and the target controls are 3 levels down from the parent window. Local parentWindow = FindWindow(0, 0, parentWindowClassName, parentWindowTitle) Local GetWindowText = user32.GetWindowTextAįindWindow:types Local parentWindowTitle = "MyWindowTitle" Local parentWindowClassName = "M圜lassName" Okay so I found out about the alien lua extension, extracted it to my CE path, and have successfully retrieved the parent window using the following lua script:

The window class for these objects does not change, and therefore it wouldn't be too hard to grab the text from them using a few Win32 API calls.īut I'm not certain how to do this via LUA in CE. I have used Spy++ to retrieve information about the static text objects in the monitoring application's window. What I would like to do is grab the temperature readouts from the application which monitors them, and use this data as the text to display in the D3D application. I also have a trainer which hooks into a D3D window and is able to display some text upon pressing a key combination. I have an application which monitors the temperature of my CPU and GPU. Posted: Wed 10:22 pm Post subject: Grab text from another window? (UPDATED)
