01-28-2009 03:30 AM
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
01-28-2009 05:12 AM
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
01-29-2009 09:40 AM
Another option:
Locals.Selection = Evaluate(Evaluate("Step.Button"+Str(Step.Result.ButtonHit)+"Label"))
01-29-2009 03:48 PM
Even easier
Ray
12-20-2010 04:10 PM
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
12-21-2010 01:05 AM
Hi Biet,
What TestStand version are you using and do you have an example to highlight this, or some snap shots of this happening.
12-21-2010 01:08 PM
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
12-22-2010 01:08 AM
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?
08-04-2014 04:26 AM
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.
08-04-2014 05:29 AM
got the workround!!. Stored the expression in local.