hooovahh Posted July 21, 2009 Report Share Posted July 21, 2009 Hello all, so I've created a VI which waits for a window to become active before going on. This is useful for when you are trying to automate something. Have LabVIEW run a exe then wait for its window to become active, then continue with keyboard presses and mouse clicks. I would submit my code to the Code Repository, except for a few things. First it's not clean enough. But more importantly it uses an AutoIt executable. I've embedded the EXE into the VI so to the user the code is seamless, but I was wondering if I could get rid of the EXE by using standard windows DLL calls. The stumbling block is I don't know how to get the title of the active window. I know that using GetActiveWindow from the user32.dll I can get the HWND for the active window, but I don't know how to get the title of that window. GetWindowText only returns the size of the string of the title. Attached is what I have so far, along with the AutoIt code. Any suggestions? Quote Link to comment
hooovahh Posted July 21, 2009 Author Report Share Posted July 21, 2009 Thanks you Crelf for helping me offline. I've attached the newer rev. of my WinWaitActive code. It is now considerably small too (not needing an autoit3 exe). It has the same functionality as described in my first post. WinWaitActive.zip Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.