01-26-2014 02:47 AM
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?
01-26-2014 08:30 PM
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
01-26-2014 09:53 PM - edited 01-26-2014 09:54 PM
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.
01-27-2014 02:25 AM
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.
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.