LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically closing an external pop-up window

Solved!
Go to solution

Greetings everyone. I feel like this question has probably been answered already, but haven't found any threads that deal with this particular setup.

 

I have an external (not LV based) program, that runs independently on the host system, that periodically and seemingly at random, throws an error message that must be acknowledged by the user with an "OK" button, to close it. The error does nothing but throw the window and halt execution until acknowledged.

 

I would like to know if there's a way to create a simple VI that runs in the background, and automatically closes that error message without requirement for human input, as the error is always the same and is irrelevant. Is it possible for a LV program to close dialog boxes from another program?

0 Kudos
Message 1 of 6
(1,496 Views)

I assume we're talking about Windows right?

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 2 of 6
(1,473 Views)

Indeed, Windows based host. 7 and 10, since we have that program running in both OS.

0 Kudos
Message 3 of 6
(1,462 Views)
Solution
Accepted by topic author Daikataro

First you'll need to download this and put it somewhere you can use it. Then it should take just a few minutes of coding to do what you want.

 

As an example, running this essentially prevents me from opening File Explorer:

 

Spoiler
FireFist-Redhawk_0-1599229298056.png

 

 

 

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

Message 4 of 6
(1,457 Views)

That seems to be the solution I'm looking for. From what I gather, I just need to specify the name of the window I wish to close? I will give it a shot and update on how it works out, thanks a lot.

0 Kudos
Message 5 of 6
(1,451 Views)

This seems to indeed, be exactly what I need. Tested it with a couple different windows, and got them to close succesfully. Now we're just hunting for the troublesome one, thanks a lot.

0 Kudos
Message 6 of 6
(1,426 Views)