Hi, I'm going to buld a mini quiz test but dont know how to get Question Line and show it turn by turn.
Like:
GUICtrlSetData($Edit1, $QuestionLine[$randomNumber] & @CRLF & $AnswerLine[1] & $AnswerLine[3] & $AnswerLine[4] )
This is my code:
; IniRead $var = "test.txt" Global $aLines Global $qLines _FileReadToArray($var, $aLines) Func Question() GUICtrlSetData($Label1, "Question: " & $iQuestion & "/" & CountQuestion()) $randomNumber = Random(1, CountQuestion(), 1) EndFunc Func CountQuestion() $iQuestion = 1 For $i =1 To $aLines[0] If StringRegExp($aLines[$i], "^\s*$") Then $iQuestion += 1 EndIf Next Return $iQuestion EndFunc
Here is the question file:
Whéré ís thé quéstión? (UNICODE) *The first line after the chapter mark *The first line after each blank line Every other line starting with the fifth The last line of every other page How are correct answers marked? *Correct answers start with an asterisk Correct answers are typed in all-caps PEST uses A.I. to guess which answer is probably the right one Philosophically, can we ever really be certain of anything? How many multiple choice answers can I have for each question? zero one *from two to eight three four