PDA

View Full Version : Need Assistance with Random Question Quiz



marc3515
02-15-2003, 09:31 AM
I am developing a Random Question Quiz and have 2 problems.
1. How would I make it so questions do not repeat?
2. Need to set the value for the correct answer on page init or show, not on click (since questions are random and I don't know before hand which question will be displayed)

I am reading the Questions from one Text File and the Answers from another.

Below is the code for page init.

<IR_ACTIONS_LIST>
<Action name="Set Random Value">
<Type>65</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%RndValue%</Variable>
<Method>0</Method>
<Maximum>4</Maximum>
<Minimum>0</Minimum>
<Mask/>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Questions.txt</FileName>
<LineNumber>%RndValue%</LineNumber>
<Variable>%Question%</Variable>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RndValue% = 0</Condition>
</Action>
<Action name="Find Line">
<Type>57</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<SearchText>Q1</SearchText>
<StartAtLineNumber>0</StartAtLineNumber>
<Variable>%AnswerLogic%</Variable>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A1%</Variable>
<Value>%AnswerLogic% + 1</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A2%</Variable>
<Value>%AnswerLogic% + 2</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A3%</Variable>
<Value>%AnswerLogic% + 3</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A4%</Variable>
<Value>%AnswerLogic% + 4</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A1%</LineNumber>
<Variable>%myAnswer1%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A2%</LineNumber>
<Variable>%myAnswer2%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A3%</LineNumber>
<Variable>%myAnswer3%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A4%</LineNumber>
<Variable>%myAnswer4%</Variable>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%myAnswer5%</Variable>
<Value/>
<Evaluate>0</Evaluate>
</Action>
<Action name="Hide Object">
<Type>16</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<ObjectName>Text6</ObjectName>
</Action>
<Action name="RETURN">
<Type>207</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RndValue% = 1</Condition>
</Action>
<Action name="Find Line">
<Type>57</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<SearchText>Q2</SearchText>
<StartAtLineNumber>0</StartAtLineNumber>
<Variable>%AnswerLogic%</Variable>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A1%</Variable>
<Value>%AnswerLogic% + 1</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A2%</Variable>
<Value>%AnswerLogic% + 2</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A3%</Variable>
<Value>%AnswerLogic% + 3</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A4%</Variable>
<Value>%AnswerLogic% + 4</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A5%</Variable>
<Value>%AnswerLogic% + 5</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A1%</LineNumber>
<Variable>%myAnswer1%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A2%</LineNumber>
<Variable>%myAnswer2%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A3%</LineNumber>
<Variable>%myAnswer3%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A4%</LineNumber>
<Variable>%myAnswer4%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A5%</LineNumber>
<Variable>%myAnswer5%</Variable>
</Action>
<Action name="RETURN">
<Type>207</Type>
<Function>1</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RndValue% = 2</Condition>
</Action>
<Action name="Find Line">
<Type>57</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<SearchText>Q3</SearchText>
<StartAtLineNumber>0</StartAtLineNumber>
<Variable>%AnswerLogic%</Variable>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A1%</Variable>
<Value>%AnswerLogic% + 1</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A2%</Variable>
<Value>%AnswerLogic% + 2</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A1%</LineNumber>
<Variable>%myAnswer1%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A2%</LineNumber>
<Variable>%myAnswer2%</Variable>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%myAnswer3%</Variable>
<Value/>
<Evaluate>0</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%myAnswer4%</Variable>
<Value/>
<Evaluate>0</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%myAnswer5%</Variable>
<Value/>
<Evaluate>0</Evaluate>
</Action>
<Action name="Hide Object">
<Type>16</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<ObjectName>Text4</ObjectName>
</Action>
<Action name="Hide Object">
<Type>16</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<ObjectName>Text5</ObjectName>
</Action>
<Action name="Hide Object">
<Type>16</Type>
<Function>0</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<ObjectName>Text6</ObjectName>
</Action>
<Action name="RETURN">
<Type>207</Type>
<Function>1</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RndValue% = 3</Condition>
</Action>
<Action name="Find Line">
<Type>57</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<SearchText>Q4</SearchText>
<StartAtLineNumber>0</StartAtLineNumber>
<Variable>%AnswerLogic%</Variable>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A1%</Variable>
<Value>%AnswerLogic% + 1</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A2%</Variable>
<Value>%AnswerLogic% + 2</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A3%</Variable>
<Value>%AnswerLogic% + 3</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A4%</Variable>
<Value>%AnswerLogic% + 4</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A5%</Variable>
<Value>%AnswerLogic% + 5</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A1%</LineNumber>
<Variable>%myAnswer1%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A2%</LineNumber>
<Variable>%myAnswer2%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A3%</LineNumber>
<Variable>%myAnswer3%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A4%</LineNumber>
<Variable>%myAnswer4%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A5%</LineNumber>
<Variable>%myAnswer5%</Variable>
</Action>
<Action name="RETURN">
<Type>207</Type>
<Function>1</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>3</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RndValue% = 4</Condition>
</Action>
<Action name="Find Line">
<Type>57</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<SearchText>Q5</SearchText>
<StartAtLineNumber>0</StartAtLineNumber>
<Variable>%AnswerLogic%</Variable>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A1%</Variable>
<Value>%AnswerLogic% + 1</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A2%</Variable>
<Value>%AnswerLogic% + 2</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A3%</Variable>
<Value>%AnswerLogic% + 3</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A4%</Variable>
<Value>%AnswerLogic% + 4</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%A5%</Variable>
<Value>%AnswerLogic% + 5</Value>
<Evaluate>1</Evaluate>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A1%</LineNumber>
<Variable>%myAnswer1%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A2%</LineNumber>
<Variable>%myAnswer2%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A3%</LineNumber>
<Variable>%myAnswer3%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A4%</LineNumber>
<Variable>%myAnswer4%</Variable>
</Action>
<Action name="Get Line">
<Type>58</Type>
<Function>0</Function>
<DTIndentLevel>5</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\Answers.txt</FileName>
<LineNumber>%A5%</LineNumber>
<Variable>%myAnswer5%</Variable>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>4</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
</IR_ACTIONS_LIST>

Any assistance with these two dilemmas would be GREATLY appreciated....Thx in Advance.

marc3515
02-15-2003, 02:48 PM
OK...I restructured the project utilizing one text file containing a list the flash file names, and several flash files which are the questions themselves....on page Close, I delete the previously displayed random filename value from the text file and drecrement the number of line values in the text file...thus overcoming the two previous problems....

Now I have just one.
Is it possible to get a random data value from a registry key?
Or is it possible to get a random value from the Global List?

I am trying to figure out a way to get around using a text file for the filename values....

Thx for any assistance....

TJ_Tigger
02-15-2003, 03:15 PM
Marc,

Here (http://www.indigorose.com/ubbthreads/showflat.php?Cat=&amp;Board=UBB2&amp;Number=13660&amp;page=&amp;vi ew=&amp;sb=&amp;o=&amp;fpart=all&amp;vc=1) is a link to a a site where Bruce and I worked on such a project. Look towards the bottom and download the latest one.

I have not had the time to go back to this project to add some additional information. Here (http://www.indigorose.com/ubbthreads/showflat.php?Cat=&amp;Board=UBB2&amp;Number=14329&amp;page=0&amp;v iew=collapsed&amp;sb=5&amp;o=0&amp;fpart=) is another post, I think Worm did it. I had thought about combining the two of them to make it more dynamic. I hope this helps.

TJ_Tigger
02-15-2003, 03:23 PM
You may want to talk with Bruce (http://www.indigorose.com/ubbthreads/showprofile.php?Cat=&amp;User=Bruce&amp;Number=14437&amp;Board =UBB2&amp;what=showflat&amp;page=&amp;view=&amp;sb=&amp;o=&amp;fpart=all&amp;v c=1) to see how his iimplementation has gone.

marc3515
02-15-2003, 03:33 PM
Thx Tigger! I had looked through the POSTS concerning that project but had not DL'd the attachment, as I didn't see any POSTS concerning my specific dilemmas....I will take a look at the files to see if they help with my origial AMS structure....

THX again....:)

TJ_Tigger
02-16-2003, 07:25 AM
As far as the random value you can use the Variable - Set Random Value action. This will set a random value between a minimum and maximum value. This was used in the project on the links that I posted above to get a random question and also to randomize the answers as well. I hope this helps.

%RndValue% = Variable.SetRandomValue (Number, 1, 100)