NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically close pop-ups

Anyone know how to close pop-up steps that appear sequences in TestStand programmatically using the API or OI?

Message Edited by Dia on 06-03-2005 01:07 PM

0 Kudos
Message 1 of 7
(3,880 Views)
If a Messagepopup cannot be closed programmatically, how about skipping over it in sequence file? How can I accomplish that using the API/OI?
0 Kudos
Message 2 of 7
(3,875 Views)
Well, you can alway drop down to the SDK and call functions like FindWindow and PostMessage, but that is a viable option only for those with experience using the Windows APIs

Instead, maybe you could place your popup in a subsequence and call it in a new hidden execution. You could then terminate the execution to remove the popup.

How you get the execution reference to the code that might need to terminate the popup and how you handle the popup results when it is not terminated would depend on your use case and on whether or not you specify that the sequence call waits for the subsequence execution to complete.
0 Kudos
Message 3 of 7
(3,869 Views)
For skipping a step from an OI, you could accomplish that in a number of ways.

Probably the simplest is to have a station global boolean variable that you use as the precondition for the steps you might skip. The OI would set or clear the variable to enable/disable the associated steps.
0 Kudos
Message 4 of 7
(3,867 Views)
Yeah, I will look into ways of doing it within the Windows API.

The popups I want to close are in sequence files that are provided to us. I do not wish to edit them since doing so would be a long tedious process every time a revision is released.

How would I specify that the sequence call does not wait for the subsequence execution to complete?

Skipping over the popup step is a possibility as well.

Message Edited by Dia on 06-03-2005 02:37 PM

0 Kudos
Message 5 of 7
(3,865 Views)
Specify that the sequence call runs in a new execution in the Multithreading and Remote Execution section of the specify module dialog box. Select the "Initially Hidden and Disable Tracing", "Do not wait", and "Do not use process model" options on the Settings... dialog box.
0 Kudos
Message 6 of 7
(3,861 Views)
I just figured this out. Another way to avoid popups is by calling SetRunModeEx from the Step class for a specific Step (The MessagePopup step) and sending RunMode_Skip as the argument to that method. When running the sequence file, TestStand will just skip over it.
0 Kudos
Message 7 of 7
(3,840 Views)