LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically click OK or close LabVIEW popup dialog box

I am able to automate user actions on any front panels within the project by modifying its values (signaling) through VI References, but I can't figure out how to access a popup dialog box to automatically close it or click OK.

 

Is there a way to do this without replacing all LabVIEW built-in dialog box calls with a custom one?

 

 

0 Kudos
Message 1 of 4
(4,354 Views)

Hi james,

 

Perhaps using two button dialog function will do the trick? 

 

You can find more info about this function here:

http://zone.ni.com/reference/en-XX/help/371361H-01/glang/two_button_dialog_box/

 

You can read the link below on using dialog related functions or creating dialog boxes:
http://www.ni.com/white-paper/8768/en/

 

Hope it helps,

 

Warmest regards,

Lennard.C

Learning new things everyday...
0 Kudos
Message 2 of 4
(4,285 Views)

Just curious, why automate user interactions? Why not have a "mode" you are in. If it's a user interaction mode, you do what the user chooses. If it's not set in user interaction mode, you just use a state machine to go to the next step, and you don't show the dialog.

 

My suggestion here seems much simpler then having value signaling propery nodes all over the block diagram.

0 Kudos
Message 3 of 4
(4,274 Views)

As others have suggested, modifying the base code in such a way that you don't need to do this would be preferable.

 

However, if you absolutely cannot do this for whatever reason, you can look into using AutoIT to do it.  You can set it up using the ActiveX control from within LabView to wait until a window pops up with a certain title, then have it automatically click the button.  

 

Link to function list

 

Basically, use WinWaitActive to wait for the dialog, then use the ControlClick function to click the button.

 

You will probably need admin permissions on whatever PC you install it on in order to use the AutoIT.

0 Kudos
Message 4 of 4
(4,254 Views)