NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

deal with teststand message popup

Hi Rafi,

 

Sorry, you will have will have to do the extra string manipulation to remove the extra quotes probably using some like Mid().

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 11 of 22
(2,753 Views)

Hi Rafi,

 

Probably the easiest to use is the SearchAndReplace() rather than the Mid() because you dont need to worry about getting the length of the string.

In my example it would look something like

 

Locals.Selection = SearchAndReplace(Evaluate(......),"\"", "", 0, false, -1)

 

Hope this is of help.

Ray

Regards
Ray Farmer
0 Kudos
Message 12 of 22
(2,751 Views)

Another option:

 

Locals.Selection = Evaluate(Evaluate("Step.Button"+Str(Step.Result.ButtonHit)+"Label"))

Message 13 of 22
(2,733 Views)

Even easier

 

Ray

Regards
Ray Farmer
0 Kudos
Message 14 of 22
(2,724 Views)

Hi Ray, 

I am using your suggestion for the same purpose. Sometimes, RunState.Sequence.Main["Message Popup"].Result.ButtonHit = 0 when OK button is selected. What is another reliable value that I can use?

 

Thanks,

Biet

0 Kudos
Message 15 of 22
(2,233 Views)

Hi Biet,

 

What TestStand version are you using and do you have an example to highlight this, or some snap shots of this happening.

 

Regards
Ray Farmer
0 Kudos
Message 16 of 22
(2,220 Views)

Hi Ray,

I am using Teststand version 4.2.1. I created Message popup with two buttons: OK and Cancel

Here is the code that I check based on the user selection.

 

If(RunState.Sequence.Main["EXT Audio Popup"].Result.ButtonHit == 1)  //click on OK button

Do something

Else

Do another thing

I place this statement in the watch window and see that

RunState.Sequence.Main["EXT Audio Popup"].Result.ButtonHit sometimes equal to 0 and sometimes it is equal to 1

I looking for a variable that always return ONE value for selecting OK button

Thanks

Biet

0 Kudos
Message 17 of 22
(2,204 Views)

Hi,

 

Where is this statement in relation to the MessagePopup Step?

If it's the Step before the If step, you could try PreviousStep.Result.ButtonHit.

 

What do you get if you check the ButtonHit value in the MessagePopup Step in it's Post Expression using Step.Result.ButtonHit?

 

 

Regards
Ray Farmer
0 Kudos
Message 18 of 22
(2,193 Views)

hi all

 

I have reopened a old thread again. I want to know is there any solution for the error coming at the edit time when we use the option suggested by Ray(error pops up when we try to run the sequence).Everytime i have click on "continue execution" in order to execute my sequence.

0 Kudos
Message 19 of 22
(1,586 Views)

got the workround!!. Stored the expression in local.

0 Kudos
Message 20 of 22
(1,582 Views)