03-28-2018 01:32 AM
Not sure which movie but right at the start , the hero will get a small display which reads ... Your mission is xxxx ..This unit will self destruct in 5 seconds ...
And after 5 seconds... poof !! ... its gone.
Inside of a QSM, i need something like this. I must display a dialog box with just a OK button. If the user does not click the OK in 5 seconds the dialog box must vanish on its own. Will look pretty cool. Anyone done this ??
Solved! Go to Solution.
03-28-2018 01:47 AM
Pretty easy. The only code in you dialog could be an Event Structure featuring two cases: one for the Value Change of the OK button, one for the Timeout (being set to 5000 ms).
However it could be better use a For Loop (with a conditional terminal) making the countdown. The loop should contain the Event Structure with a 1000 ms timeout; the Value Change case should output a true value to be wired to the conditional terminal.
03-28-2018 03:02 AM
@pincpanter wrote:
Pretty easy. The only code in you dialog could be an Event Structure featuring two cases: one for the Value Change of the OK button, one for the Timeout (being set to 5000 ms).
However it could be better use a For Loop (with a conditional terminal) making the countdown. The loop should contain the Event Structure with a 1000 ms timeout; the Value Change case should output a true value to be wired to the conditional terminal.
Maybe the example i have made will explain the problem more clearly : ( It is done in LV2012)
03-28-2018 03:11 AM
03-28-2018 03:18 AM
This will not work, as the One Button Dialog vi will wait for the user click forever.
You need to replace the One Button Dialog vi with your own vi, managing the 5 seconds timeout.
See the attached example.
03-28-2018 03:42 AM
Thanks folks... that now confirms the simplest way to achieve the Auto Quenching dialog box is to create a VI with the required timing functionality built into it !!
03-28-2018 11:24 AM
The simplest way is to get pincpanter to make it for you 😉
03-28-2018 03:06 PM
I thought for sure this was Mission Impossible
03-29-2018 04:15 AM
Mission Accomplished !!
Full code attached as a ZIP file. Unzip and run the Main.vi
PS : Any improvements are welcome !