OK. So I am working to try to randomize questions and the answers for the questions and then do a TextObject(text1) Set.Text (whatever).
I have it worked out to randomize the questions, at lease the first one. But when I get to the answers I am having problems. I tried to do use an IF statement to not select an index but it ties up the program. It works for the first two questions but the program hangs on the third question
Redo3
%RndAnswer% = VariableSetRandomValue (Number, 1, 4)
IF (%RndAnswer% = %A1% or %A2%)
GOTO (Redo3)
EndIF
%A3% = %RndAnswer%
Then I proceed to set a TextObject to the value located at the Random Value if it does not match %A1% or %A2%. But like i said it hangs.
OK, So then I think, well if it doens't like that, maybe I will try to remove the value once it is populated on the page. The problem I run into is the delimiter. If the random value that is chosen is the first or last, the delimiter is left in place and I occasionally get a blank field.
Anyone have suggestions on how to get a random value from a string and assign it to a text object and move on to the next.
I have attached the project to show what I am trying to do.
13660-test proggie.zip
I have it worked out to randomize the questions, at lease the first one. But when I get to the answers I am having problems. I tried to do use an IF statement to not select an index but it ties up the program. It works for the first two questions but the program hangs on the third question
Redo3
%RndAnswer% = VariableSetRandomValue (Number, 1, 4)
IF (%RndAnswer% = %A1% or %A2%)
GOTO (Redo3)
EndIF
%A3% = %RndAnswer%
Then I proceed to set a TextObject to the value located at the Random Value if it does not match %A1% or %A2%. But like i said it hangs.
OK, So then I think, well if it doens't like that, maybe I will try to remove the value once it is populated on the page. The problem I run into is the delimiter. If the random value that is chosen is the first or last, the delimiter is left in place and I occasionally get a blank field.
Anyone have suggestions on how to get a random value from a string and assign it to a text object and move on to the next.
I have attached the project to show what I am trying to do.
13660-test proggie.zip
Comment