Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2002
    Posts
    7

    Grin Need Assistance with Random Question Quiz

    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.

  2. #2
    Join Date
    Nov 2002
    Posts
    7

    Star Re: Need Assistance with Random Question Quiz

    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....

  3. #3
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160

    Re: Need Assistance with Random Question Quiz

    Marc,

    Here 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 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
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  4. #4
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160

    Re: Need Assistance with Random Question Quiz

    You may want to talk with Bruce to see how his iimplementation has gone.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  5. #5
    Join Date
    Nov 2002
    Posts
    7

    Re: Need Assistance with Random Question Quiz

    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....

  6. #6
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160

    Re: Need Assistance with Random Question Quiz

    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)
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts