Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

popup dialog box

Solved!
Go to solution
Dear all,
             In my project, am using LabView 8.5 as a backend application. In front there is one application running. It was USB test having several number of built-in small tests. For each small test after the test ends, one popup box appear stating the results of tests and OK button was there. In my application i have to automatically generate a click event so that whenever a popup dialog box appears the mouse cursor will move to the OK button and have to press it automatically so that next test will carry on automatically. I have succeeded in bringing the mouse cursor to that point to the OK button. Also i have succeeded in generating click event. I used user32.dll
 
But the problem is i have generated the mouse cursor movement and click event in a predetermined time delay. Instead of predetermined delay value, only when a popup dialog box appears, then only the cursor should move to that position and click event on OK button should be done.
 
My question is how a popup dialog box will be traced out in LabView 8.5
 
Kindly respond as early as possible.
Thanks,
 
Mathan
Message 1 of 5
(3,911 Views)

Hi Mathan,

i think if the window pops up it gets the focus and so it is the foreground window. So you can use the GetForgroundWindow function from the user32.dll and then the GetWindowText function to get the active window. Do this in a while loop and check of your specified window pops up. If the window pops up you can generate an event and react on it.

Mike

Message 2 of 5
(3,910 Views)

Hai Mike,

              That's really a great support. Thanks. But still i don't know about what are the parameters to be given for the functions you mentioned. Actually am using Call Library Function Node for configuring user32.dll. In that node what are the parameters i have to give in the parameters tab. Kindly give me support as early as possible. Also could you please give me a sample structure of the while loop you meentioned.

Thanks,

Mathan.

0 Kudos
Message 3 of 5
(3,906 Views)
Solution
Accepted by topic author Mathan

Hi mathan,

see the attached example.

Mike

Message 4 of 5
(3,904 Views)
Hi Mike,
            Thousands of thanks first. I didn't expect such a great favour from you. That too this much earlier. i will implement your suggestions and if any help required immediately i will post you.
 
Thanks & Kind Regards,
 
Mathan
0 Kudos
Message 5 of 5
(3,898 Views)