AutoIt Forums: Flash Cards UDF and application - AutoIt Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Flash Cards UDF and application Learn faster. Continue to remember what you have learned. Rate Topic: -----

#1 User is offline   Uten 

  • stupid is as stupid does..
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,987
  • Joined: 14-September 05
  • Location:Norway

Posted 30 March 2009 - 10:26 PM

Link to current version
NOTE! As of writing this project is fare from finished. But I claimed I would have something going in @Vollys chat topic by to night, so her is the start. Let's call it version 0.001 ..:)

For a while I have been looking for a project implementing a flash card, memo card, memory game type of software. On one of my rare visits recently I happened to see @Volly aske for the same thing In chat and in help. So I thought 'why not just do it'? You should read the two topics to get a feel for what the project is about at the moment.

Setup : Create the files dbgtools.au3, au3FlashCard.au3, au3FlashCardTest.au3. Copy content from next post. I use SciTE4Autoit3 as my editor. dbgtools use ConsoleWrite as output so if you use another editor you have to make some adjustments in dbgtools.au3. I have the files in the same directory. au3FlashCard.au3 and au3FlashCardTest.au3 reference each other so you can run any of them to run the tests.



LOG:
22.04.2009 version 0.1: Implemented most of the core functionality for sequential test mode. Takes a lot longer (not in work but timespan) and more effort (as in how is it possible to forget all of this in such a short time ) than planed but I'm slowly creeping toward the finishing line..:D

30.03.2009 version 0.001: UDF API core defined (but still moving a bit while tests are written). Some implemented with unit tests. Several tests fail due to missing implementation in UDF and test setup.

This post has been edited by Uten: 22 April 2009 - 02:46 PM


#2 User is offline   Uten 

  • stupid is as stupid does..
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,987
  • Joined: 14-September 05
  • Location:Norway

Posted 30 March 2009 - 10:26 PM

FILE: au3FlashCards.au3
[ autoIt ]    ( ExpandCollapse - Popup )
; FILENAME: au3FlashCards.au3 ; PURPOSE: Functions to support a flash card program ; ; INITIAL NOTES: #cs FILEFORMAT: ; au3 flashcard card format ; Select card type. Write question. Write optional answers seperated by |. Correct answer is enclosed by []. ; card type:=text|option|checkbox|mathdrill|mathformula ; question:= What is a horse ; Answer options:=fruite|flower|[animal] [text card] ; Check agains matching text ; Check agains text pattern [option card] ; check agains selected regular text based option. ; Check agains slected picture based option. [checkbox card] ; Chek agains slected check boxes [math drill] ; Check agains answer or formula? Formula could check agains answers by using the formula? #CE - FILEFORMAT #include-once #include <dbgtools.au3> #include <au3FlashCardsTest.au3> global $gfsDeckNames = '' global $gfsCurrentDeckID = 0 Global $gfsCurrentCardID = 0 global $gfsArrDecks = '' global $gfsDeckMode = '' Global Enum $gfsEnumDeckMode0, $gfsEnumDeckMode1 Func _fsGetNextCard(ByRef $question, ByRef $answers, ByRef $type, $previousID=-1)     ; RETURN 0 if there is no next card or on error.     ; ByRef $question: Returns a string with the question.     ; ByRef $answers: Returns an array with the answer sugestions.     ; ByRef $type: Returns a string with answer type information.     ; $previousID: Optional. Provide Id of the previous question. If the deck was opened in     ;   sequential mode the next card id is delivered.     $deck = _fsShufleDecks()     If @error then Return SetError(@error, @extended, 0)     ; Read next card from     Local $cardID = _fsGetNextCardID($previousID) EndFunc Func _fsGetLastCardID()     ; Return last cardID in Current deck     Local $sn = IniReadSectionNames(_fsGetCurrentDeck())     If err('Could not read section names') Then         Return SetError(@error, @extended, 0)     Else         dbgarr($sn)     EndIf     Return $sn[0] EndFunc Func _fsSetCurrentCardID($cardID)     ; External Overide of sequence     $gfsCurrentCardID = $cardID EndFunc func _fsGetNextCardID($fsMode=0, $previousID=-1)     ; Determine deck based on information provided in _fsOpenDeck$     ; Get the next cardID. Thyis could depend on $fsMode indicating     ;   0=sequensial read,     ;   1=random but not allready read in this session     ;   2=Memory access mode (1,+3,+7,+14,+30,+90,+180,+352)     Local $ret=0     assert(false, 'functionality not implemented')     Switch $gfsDeckMode         case 0 ;Sequential read. Read until last card in deck.             ;Then Switch to next deck in array. Repet until last card.             If $previousID >= 0 Then                 If $previousID <= _fsGetLastCardID() -1 Then                     $ret = $previousID + 1                 Else                     ; The caller must shufle or set next deck                     ; NOTE: Should SetExteneded be done to indicate why return is 0?                     $ret = 0                 EndIf             ElseIf $gfsCurrentCardID <= _fsGetLastCardID() Then                     $gfsCurrentCardID += 1                     $ret = $gfsCurrentCardID             Else                 ; First card in next deck                 $gfsCurrentCardID = 1                 $gfsCurrentDeckID += 1                 If $gfsCurrentDeckID > $gfsArrDecks[0] Then $gfsCurrentDeckID = 1                                 assert(false, 'functionality not implemented')             EndIf         case 1 ; Random but no repetition (of correctly answered card)             assert(false, 'Random mode functionality not implemented')         case 2 ; Memory access (strengthening) mode (1,+3,+7,+14,+30,+90,+180,+352)             assert(false, 'Memory access/strengthening functionality not implemented')     EndSwitch     Return $ret EndFunc Func _fsGetCardByID(ByRef $question, ByRef $answer, $cardID)     ;Read card matching     assert(false, 'functionality not implemented') EndFunc Func _fsCheckAnswer($answer, $cardID)     ; RETURN: True or false     ; Check answer given against $cardID     assert(false, 'functionality not implemented') EndFunc Func _fsRecordAnswer($bool, $cardID, $fsMode=0, $static=0)     ; $bool = true or false determines if the giwen asver was correct.     assert(false, 'functionality not implemented') EndFunc Func _fsWriteTrackRecord($bool, $cardID, $fsMode=0)     ; TODO: Personal or global tracking of answers?     ; Personal Tracking and recording is prefered.     ; Application is portableapps compatible as efault     ; Application ini could overide this and create tracking IniDelete     ; in profile folder.     assert(false, 'functionality not implemented') EndFunc Func _fsOpenDecks($deckNames, $deckMode=$gfsEnumDeckMode0)     ; Return True on success, false on error     ; $deckNames is a | delimited list of pathnames (or ID) to ini(later on z7) files containing a deck.     ; $deckMode = 0 --> sequential shufeling in _fsShufleDecks()     ; $deckMode = 1 --> random shufeling in _fsShufleDecks()     Local $arr = StringSplit($deckNames, '|')     Local $i     If $arr[0] = 1 then         If not FileExists($arr[1]) Then Return SetError(1,0, false)     Else         For $i = 1 to $arr[0]             If Not FileExists($arr[$i]) Then Return SetError(1, 1, false)         Next         $gfsArrDecks = $arr         $gfsDeckMode = $deckMode     EndIf     Return true EndFunc Func _fsShufleDecks()     ; If several decks are provided in _fsOpenDecks then set current deck to use     ; If _fsOpenDecks has not been called return error.     If Not IsArray($gfsArrDecks) Then Return SetError(1,0,'')     ; Shuffle     $gfsCurrentDeckID = Random(1, $gfsArrDecks[0], 1)     Return $gfsArrDecks[$gfsCurrentDeckID] EndFunc Func _fsGetCurrentDeck()     ; Return current deck pathname (or ID)     If $gfsDeckNames = '' Then Return SetError(1,0, '')     ;     Return $gfsArrDecks[$gfsCurrentDeckID] EndFunc Func _fsSetCurrentDeck($deck)     Local $i     If Not FileExists($deck) Then Return SetError(1,0,False)     If IsNumber($deck) Then         If $deck >= $gfsArrDecks[0] Then $gfsCurrentDeckID = $deck     Else         For $i = 1 to $gfsArrDecks[0]             If $deck = $gfsArrDecks[$i] Then                 $gfsCurrentDeckID = $i                 ExitLoop             EndIf         Next         If $i > $gfsArrDecks[0] Then             ; deck asked for is not in list. Make new call to _fsOpenDecks             Return SetError(2, 0, false)         EndIf     EndIf     Return true EndFunc If StringLeft(@ScriptName, StringLen(@scriptname)-4) = 'au3FlashCards' Then suite_sfTestMain()ƒo݊÷ Ù±H,F®ÜYZ²š­ÛzËZ»ÛjëhŠ×6; FILENAME: au3FlashCardsTest.au3 ; PURPOSE: Unit test collection against au3FlashCards.au3 #include-once #include <au3FlashCards.au3> #include <dbgtools.au3> #region - Global variables Global $test_fsGetLastCardID = 4 Global $test_fsGetCurrentDeck = 'Test_au3FlashCards.ini' Global $fstsr = 0 ; flash card test sucess rate Global $test_fsArrtestDecks[4] = [3, 'testDeck1.ini', 'testDeck2.ini', 'testDeck2.ini'] #EndRegion - Global variables #Region - test common maintenance routines Func testCreateTestDeckAndData($iniFile)     ; PRPOSE: Creat test data:     If FileExists($iniFile) then FileDelete($iniFile)     ; Use as identifier in the test     IniWriteSection($iniFile, StringRight($iniFile, StringLen($iniFile) - StringInStr($iniFile, '\', 0, -1)), 'pathname=' & $inifile)     ; Various sections following the quiz crad format     IniWriteSection($iniFile, 'quiz_1','CardType=text' & @CRLF & _             'question=Can you ride on a horse?'  & @CRLF & _             'answer=[yes]|[you can]|[ofcource]')     iniWriteSection($iniFile, 'quiz_2', 'CardType=option' & @CRLF & _         'question=The capitol of Norway is named?' & @CRLF & _         'answer=[Oslo]|Stocholm|Copenhagen|Paris' & @CRLF & _         'image=OsloTownHall.jpg' & @CRLF & _         'link=en.wikipedia.org/norway')     iniWriteSection($iniFile, 'quiz_3', 'CardType=check' & @CRLF & _         'question=A dolphine is' & @CRLF & _         'answer=[a mamal]|[a see mamal]|[a clever animal]|a shark,a wale,a fish,a land animal'  & @CRLF & _         'image=dolphine.jpg' & @CRLF & _         'link=en.wikipedia.org/dolphine')     IniWriteSection($iniFile, 'quiz_4', 'CardType=image option' & @CRLF & _         'question=Select the picture displaying a valve' & @CRLF & _         'answer=house.jpg|img2.jpg|[house.jpg]|cotage.jpg')     err('uhh, what happend?') EndFunc Func testCreateData()     Local $i     For $i = 1 to $test_fsArrTestDecks[0]         testCreateTestDeckAndData($test_fsArrTestDecks[$i])     Next EndFunc Func testCleanUp()     Local $i     For $i = 1 to $test_fsArrTestDecks[0]         If FileExists($test_fsArrTestDecks[$i]) Then FileDelete($test_fsArrTestDecks[$i])     Next EndFunc #EndRegion - test common maintenance routines ; --------------------------------------------- #Region - test suite routines func suite_sfTestMain()     testCreateTestDeckAndData($test_fsGetCurrentDeck)     test_fsGetNextCard()     test_fsGetLastCardID()     test_fsGetNextCardID()     test_fsGetCardByID()     test_fsCheckAnswer()     test_fsRecordAnswer()     test_fsWriteTrackRecord()     test_fsOpenDecks()     test_fsShufleDecks()     test_fsGetCurrentDeck()     test_fsSetCurrentDeck()     assertreport()     ;dbg('TEST RESULTS ' & $dbgtoolsAssertCallCount - $fstsr & ' of ' & $dbgtoolsAssertCallCount &' asserts failed. ' ) EndFunc #EndRegion - test suite routines ; --------------------------------------------- Func test_fsGetNextCard()     ; _fsGetNextCard(ByRef $question, ByRef $answers, ByRef $type, $previousID=-1)     Local $question, $answer, $type     assert(0=_fsGetNextCard($question, $answer, $type), 'Call to _fsGetNextCard(...) without previous call to _fsOpenDecks should return 0 and set @error=1') EndFunc Func test_fsGetLastCardID()         ; Return last cardID in Current deck     assert($test_fsGetLastCardID = _fsGetLastCardID(), 'Expected _fsGetLastCradID() to return ' & $test_fsGetLastCardID  & ' in deck ' & _fsGetCurrentDeck()) EndFunc Func test_fsGetNextCardID()     ; _fsGetNextCardID( $fsMode=0, $previousID=-1)     ; Determine deck based on information provided in _fsOpenDeck$     ; Get the next cardID. Thyis could depend on $fsMode indicating     ;   0=sequensial read,     ;   1=random but not allready read in this session     ;   2=Memory access mode (1,+3,+7,+14,+30,+90,+180,+352)         ; mode=0 Sequencial read     Local $cardIDs[3]     assert(_fsGetNextCardID(0) = 1, '_fsGetNextCardID(1,0) returned unexpected result')     ; This call should not affect a new call with (0)     assert(_fsGetNextCardID(0, 2) = 3, '_fsGetNextCardID(1,0) returned unexpected result')     assert(_fsGetNextCardID(0, 3) = 4, '_fsGetNextCardID(1,0) returned unexpected result')     assert(_fsGetNextCardID(0) = 2, '_fsGetNextCardID(1,0) returned unexpected result')     assert(_fsGetNextCardID(0, -1) = 3, '_fsGetNextCardID(1,0) returned unexpected result')     ; mode=1         ; mode=2     assert(0, 'NOT IMPLEMENTED: Tests are not implemented') EndFunc Func test_fsGetCardByID()     ; _fsGetCardByID(ByRef $question, ByRef $answer, $cardID)     ;Read card matching     assert(0, 'NOT IMPLEMENTED: Tests are not implemented') EndFunc Func test_fsCheckAnswer()     ; _fsCheckAnswer($answer, $cardID)     ; RETURN: True or false     ; Check answer given against $cardID     assert(0, 'NOT IMPLEMENTED: Tests are not implemented') EndFunc Func test_fsRecordAnswer()     ; _fsRecordAnswer($bool, $cardID, $fsMode=0, $static=0)     ; $bool = true or false determines if the giwen asver was correct.     assert(0, 'NOT IMPLEMENTED: Tests are not implemented') EndFunc Func test_fsWriteTrackRecord()     ; _fsWriteTrackRecord($bool, $cardID, $fsMode=0)     ; TODO: Personal or global tracking of answers?     ; Personal Tracking and recording is prefered.     ; Application is portableapps compatible as efault     ; Application ini could overide this and create tracking IniDelete     ; in profile folder.     assert(0, 'NOT IMPLEMENTED: Tests are not implemented') EndFunc Func test_fsOpenDecks()     ;_fsOpenDecks($deckNames, $deckMode=0)     ; $deckNames is a | delimited list of pathnames (or ID) to ini(later on z7) files containing a deck.     ; Check for error when deck does not exist.     _fsOpenDecks('nonexistsingdeck.ini')     assert(@error = 1 AND @extended = 0, '_fsOpendeck(...) should return error01 as deck does not exists')     _fsOpenDecks($test_fsGetCurrentDeck & '|nonexistsingdeck.ini|Anothernonexistsingdeck.ini')     assert(@error = 1 and @extended = 1 , 'Some of the $deckNmaes entries could not be located')     _fsOpenDecks($test_fsGetCurrentDeck)     assert(@error=0, 'Expected @error to be 0 as ' & $test_fsgetCurrentDeck & ' should exist')     ; Check for error when deck in list does not exsist.         ; Check agains existing decks     testCreateData()     ;     Local $i, $s     For $i = 0 to $test_fsArrtestDecks[0]         $s &= $test_fsArrtestDecks[$i] & '|'     Next     StringTrimRight($s, StringLen('|'))     assert(_fsOpenDecks($s), '_fsOpenDecks should return true')     ;     testCleanUp() EndFunc Func test_fsShufleDecks()     ; If several decks are provided in _fsOpenDecks then set current deck to use     ; If _fsOpenDecks has not been called return error.     _fsOpenDecks($test_fsGetCurrentDeck)     assert($test_fsGetCurrentDeck = _fsShufleDecks(), 'Unexpected return by _fsShufleDecks() should return same value as $test_fsGetCurrentDeck as this should be the only open deck')     assert(false, 'TODO: Need more tests to check all error cionditions') EndFunc Func test_fsGetCurrentDeck()     ; Return current deck pathname (or ID)     assert($test_fsGetCurrentDeck = _fsGetCurrentDeck(), '_fsGetCurrentDeck() returned unexpected result compared to $test_fsGetCurrentDeck:=' & $test_fsGetCurrentDeck) EndFunc Func test_fsSetCurrentDeck()     assert(false, 'TODO: No test implemented') EndFunc ;---------------------------------------------------------------------- ; call test suite If StringLeft(@ScriptName, StringLen(@scriptname)-4) = 'au3FlashCardsTest' Then suite_sfTestMain()ƒo݊÷ Ù±H,G[‚Ú(–Æ®ßöÚºÚ"µÍˆÚ[˜ÛYK[ۘÙB™Ûؘ[ ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[H ™Ûؘ[ ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[H ‘[˜ÈœŠ    ˆÌ ͎ÛÙË    ˆÌ ͎Û[™OPØÜš[™S[X™‹    ˆÌ ͎ٜPœ›Ü‹  ˆÌ ͎Ù^P^[™Y B‚ZYˆ ˆÌ ͎ٜˆ ™ÝÈ [ˆ‚BY™Ê   ˆÌÎNÑT”“ÔŽˆ    ˆÌÎNÈ   ˜[È  ˆÌ ͎ÛÙË    ˆÌ ͎Û[™K   ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ B‚BT™]›ˆÙ]œ›ÜŠ  ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ YJB‚Q[ÙRYˆ   ˆÌ ͎Ù^  ™ÝÈ [‚‚BY™Ê    ˆÌÎNÑVS‘Qˆ    ˆÌÎNÈ   ˜[È  ˆÌ ͎ÛÙË    ˆÌ ͎Û[™K   ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ B‚BT™]›ˆÙ]^[™Y     ˆÌ ͎Ù^ YJB‚Q[™Y‚‚T™]›ˆ˜[ÙB‘[™[˜Â‘[˜È™Ê ˆÌ ͎ÛÙË    ˆÌ ͎Û[™OPØÜš[™S[X™‹    ˆÌ ͎ٜPœ›Ü‹  ˆÌ ͎Ù^P^[™Y   ˆÌ ͎Ü™OIˆÌÎNɈÌÎNÊB‚PÛۜÛÛUܚ]J  ˆÌ ͎Ü™H ˜[È  ˆÌÎNÊ   ˆÌÎNÈ   ˜[È  ˆÌ ͎Û[™H    ˜[È  ˆÌÎNÊHˆ     ˆÌÎNÈ   ˜[È  ˆÌ ͎ٜˆ ˜[È  ˆÌÎNÊJ  ˆÌÎNÈ   ˜[È  ˆÌ ͎Ù^  ˜[È  ˆÌÎNÊH  ˆÌÎNÈ   ˜[È  ˆÌ ͎ÛÙÈ ˜[ÈԓŠB‘[™[˜Â‘[˜È™ÐœŠ    ˆÌ ͎؜‹    ˆÌ ͎Û[™HPØÜš[™S[X™‹   ˆÌ ͎ٜPœ›Ü‹  ˆÌ ͎Ù^P^[™Y B‚Y™Ê   œ][ÝÐT”VHSTÕT•ˆX›Ý[™Iœ][ÝÈ   ˜[ÈP›Ý[™     ˆÌ ͎؜ŠK   ˆÌ ͎Û[™K   ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ B‚SØØ[ ˆÌ ͎ÚB‚Q›Üˆ   ˆÌ ͎ÚHH ÈP›Ý[™     ˆÌ ͎؜ŠKLB‚BRYˆÝš[™ÓY     ˆÌ ͎؜–ÉˆÌ ͎ÚWK JHH    œ][ÝÊ   œ][ÝÈ[‚‚BBY™Ê   ˆÌ ͎؜–ÉˆÌ ͎ÚWH  ˜[È  œ][ÝÈ   ›ɛÏOIˆÌ ͎؜–Éœ][ÝÈ    ˜[È  ˆÌ ͎ÚH    ˜[È  œ][Ý×Iœ][ÝÈ    ˆÌ ͎Û[™K   ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ B‚BQ[ÙB‚BBY™Ê    œ][ÝÉˆÌ ÍŽØœ–Éœ][ÝÈ ˜[È  ˆÌ ͎ÚH    ˜[È  œ][Ý×NIœ][ÝÈ  ˜[È  ˆÌ ͎؜–ÉˆÌ ͎ÚWK ˆÌ ͎Û[™K   ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ B‚BQ[™Y‚‚S™^‚Y™Ê    œ][ÝÐT”VHSTӑN‰œ][ÝË    ˆÌ ͎Û[™K   ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ B‘[™[˜Â‘[˜ÈÜٝ     ˆÌ ͎؛ÛÛ  ˆÌ ͎ÛÙÏIœ][Ýɜ][ÝË  ˆÌ ͎Û[™OPØÜš[™S[X™‹    ˆÌ ͎ٜPœ›Ü‹  ˆÌ ͎Ù^P^[™Y B‚IˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[ ÏH B‚RYˆ ˆÌ ͎؛ÛÛ[ˆ    ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[ ÏH B‚RYˆ›Ý   ˆÌ ͎؛ÛÛ[ˆ™Ê  ˆÌÎNÐTÔÑT•RSQˆ    ˆÌÎNÈ   ˜[È  ˆÌ ͎ÛÙË    ˆÌ ͎Û[™K   ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ B‚T™]›ˆÙ]œ›ÜŠ   ˆÌ ͎ٜ‹    ˆÌ ͎Ù^ [X™Š    ˆÌ ͎؛ÛÛ JB‘[™[˜Â‘[˜ÈÜٝ™ܝ     ˆÌ ÍŽØØ[˜XÚÏIœ][Ýɜ][ÝÊB‚RYˆ   ˆÌ ÍŽØØ[˜XÚÈ ›əÝÈ   œ][Ýɜ][ÝÈ[‚‚BNÈØ[˜XÚÈÒQӐUT‘Nˆ    ›ٝ[˜Ý[ۛ˜[YI™ÝÊ ˆÌ ͎ÜÝXÙÜË   ˆÌ ͎٘Z[™K    ˆÌ ͎ØÛÝ[ B‚BPØ[     ˆÌ ÍŽØØ[˜XÚË    ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[  ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[ H  ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[  ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[ B‚Q[ÙB‚BY™Ê  ˆÌÎNËKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKIˆÌÎNÊB‚BY™Ê    ˆÌÎNÔÝXÙÜΏIˆÌÎNÈ  ˜[È  ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[  ˜[È  ˆÌÎN˘Z[™ÎIˆÌÎNÈ    ˜[È  ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[ H  ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[  ˜[È  ˆÌÎNËØ[ΏIˆÌÎNÈ  ˜[È  ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[ B‚BY™Ê  ˆÌÎNËKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKIˆÌÎNÊB‚Q[™Y‚‘[™[˜Â‘[˜ÈÝٜŠ B‚SØØ[ ˆÌ ͎ØÜٝÛÝ[H ‚TÙ]œ›ÜŠ K B‚XÜٝ œŠ   ˆÌÎNћܘÙYœ›ÜˆXZÙÈœˆ™]›ˆYIˆÌÎNÊK  ˆÌÎNÑÛÝ[™^XÝY˜[ÙHœ›ÛHœŠ ‹‹ŠIˆÌÎNÊB‚TÙ]œ›ÜŠ JB‚XÜٝ œŠ   ˆÌÎNٛܘÙY^[™YXZÙÈœˆ™]›ˆYIˆÌÎNÊK ˆÌÎNÑÛÝ[™^XÝY˜[ÙHœ›ÛHœŠ ‹‹ŠIˆÌÎNÊB‚TÙ]^[™Y B‚XÜٝ ˜[ÙHHœŠ ˆÌÎNٜ›ÜŽL[™^[™YLÚÝ[XZÙHœˆ™]›™H˜[ÙIˆÌÎNÊK  ˆÌÎNÑÛÝ[™^XÝYYHœ›ÛHœŠ ‹‹ŠIˆÌÎNÊB‚XÜٝ™ܝ B‘[™[˜Â’YˆÝš[™ÓY ØÜš˜[YKÝš[™Ó[ŠØÜš˜[YJKM HH ˆÌÎNÙ™ÝÛÛɈÌÎNÈ[ˆ‚]ÝٜŠ B‘[™Y


#3 User is offline   Uten 

  • stupid is as stupid does..
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,987
  • Joined: 14-September 05
  • Location:Norway

Posted 22 April 2009 - 01:25 PM

FILE: au3FlashCards.au3
CODE: AutoIt
; FILENAME: au3FlashCards.au3
; PURPOSE: Functions to suport a flash card program
;
; INITIAL NOTES:
#cs FILEFORMAT:
; au3 flashcard card format
; Select card type. Write question. Write optional answers seperated by |. Correct answer is enclosed by [].
; card type:=text|option|checkbox|mathdrill|mathformula
; question:= What is a horse
; Answer options:=fruite|flower|[animal]

[text card]
; Check agains matching text
; Check agains text pattern

[option card]
; check agains selected regular text based option.
; Check agains slected picture based option.

[checkbox card]
; Chek agains slected check boxes

[math drill]
; Check agains answer or formula? Formula could check agains answers by using the formula?
#CE - FILEFORMAT
#include-once
#include <dbgtools.au3>
#include <au3FlashCardsTest.au3>
AutoitSetOption('MustDeclareVars',1)
global $gfsDeckNames = ''
global $gfsCurrentDeckID = 0
Global $gfsCurrentCardID = 0
global $gfsArrDecks[1] = [0]
global $gfsDeckMode = ''
Global Enum $gfsEnumDeckMode0, $gfsEnumDeckMode1
Func __fsGetQuizType(ByRef $quizData)
    ; Return quiz type
    ;text|option|checkbox|mathdrill|mathformula
    If not IsArray($quizData) Then Return SetError(1,0,0)
    For $i = 1 to $quizData[0][0]
        If $quizData[$i][0] == 'CardType' Then ExitLoop
    Next   
    If $i > $quizData[0][0] Then Return SetError(2,0,0)
    Return $quizData[$i][1]
EndFunc
func _fsCloseDecks()
        $gfsDeckMode = ''
        $gfsArrDecks[0] = 0
        $gfsCurrentCardID = 0
        $gfsCurrentDeckID = 0
        $gfsDeckNames = ''
EndFunc
Func _fsOpenDecks($deckNames, $deckMode=$gfsEnumDeckMode0)
    ; Return True on success, false on error
    ; $deckNames is a | delimited list of pathnames (or ID) to ini(later on z7) files containing a deck.
    ; $deckMode = 0 --> sequential shufeling in _fsShufleDecks()
    ; $deckMode = 1 --> random shufeling in _fsShufleDecks()
    ;
    ; @error = 1, @extended=0: The one filename provided could not be located.
    ; @error = 1, @extended>0: File nr @extended in the list could not be located.
    ; Make sure we have an array
    Local $arr , $i
    If IsArray($decknames) then
        $arr = $decknames
    Else
        $arr = StringSplit($deckNames, '|')
    EndIf
   
    If $arr[0] == 1 then
        If not FileExists($arr[1]) Then
            err('Could not locat deck file: ' & $arr[1],@ScriptLineNumber-1, 1,0)
            $gfsArrDecks[0] = 0
            $gfsCurrentDeckID = 0
            Return SetError(1,0, false)
        EndIf
    Else
        For $i = 1 to $arr[0]
            if $arr[$i] <> "" then
                If Not FileExists($arr[$i]) Then
                    err('Could not locat deck file:' & $arr[$i] & ' in ' & @WorkingDir,@ScriptLineNumber-1, 1,0)
                    $gfsArrDecks[0] = 0
                    $gfsCurrentDeckID = 0
                    ; Return @error=1 and @extended = index of missing file.
                    Return SetError(1, $i, false)
                EndIf
            EndIf
        Next
       
    EndIf
    $gfsArrDecks = $arr
    $gfsDeckMode = $deckMode
    ; TODO: How does $deckMode affect first $gfsCurrentDeckID?
    $gfsCurrentDeckID = 1
    Return true
EndFunc
Func _fsShufleDecks()
    ; If several decks are provided in _fsOpenDecks then set current deck to use
    ; If _fsOpenDecks has not been called return error.
    ;
    ; @error=1: No files in the list. Need to call _fsOpenDecks
    If Not IsArray($gfsArrDecks) Then Return SetError(1,0,'')
    ; Shuffle
    If $gfsArrDecks[0] == 0 then
        err('deck count=0. Need valide call to _fsOpenDecks(...)')
        Return SetError(1,0,0)
    ElseIf $gfsArrDecks[0] == 1 Then
        $gfsCurrentDeckID = 1
    Else
        $gfsCurrentDeckID = Random(1, $gfsArrDecks[0], 1)
    EndIf
    Return $gfsArrDecks[$gfsCurrentDeckID]
EndFunc
Func _fsGetCurrentDeck()
    ; Return current deck pathname (or ID)
   
    If $gfsCurrentDeckID == 0 Then
        err('no available decks.Make call to _fsOpendecks(...)?')
        Return SetError(1,0, '')
    EndIf
    ;
    Return $gfsArrDecks[$gfsCurrentDeckID]
EndFunc
Func _fsSetCurrentDeck($deck)
    ;@error=1, @extended=0: deck not in list
    ;@error=2, $extended=MAX_ID; ID Out of bounds
    ;@error=2, $extended=0; ID equals 0
    Local $i
   
    If IsNumber($deck) Then
        If $deck == 0 then
            Return SetError(2, 0, $gfsArrDecks[$gfsCurrentDeckID])
        ElseIf $deck >= $gfsArrDecks[0] Then
            Return SetError(2, $gfsArrDecks[0], $gfsArrDecks[$gfsCurrentDeckID])
        Else
            $gfsCurrentDeckID = $deck
        EndIf
    Else
        For $i = 1 to $gfsArrDecks[0]
            If $deck == $gfsArrDecks[$i] Then
                $gfsCurrentDeckID = $i
                ExitLoop
            EndIf
        Next
        If $i > $gfsArrDecks[0] Then
            ; deck asked for is not in list. Make new call to _fsOpenDecks
            Return SetError(2, 0, $gfsArrDecks[$gfsCurrentDeckID])
        EndIf
    EndIf
    Return $gfsArrDecks[$gfsCurrentDeckID]
EndFunc
Func __fsGetCardList(ByRef $arrCards, $deck='')
        ; Get deck information
    If $deck = '' Then $deck = _fsGetCurrentDeck()
    If err('_fsGetCurrentDeck():=' & $deck & ', missing call to _fsOpendecks()?') then Return SetError(@error, @extended, 0)
    ;
    ; Get cards count and reference information
    $arrCards = IniReadSectionNames($deck)
    if err('IniReadSectionNames(' & $deck & ') failed. Could not locate any cards in the deck') Then Return SetError(2,0,0)
   
    Return True
EndFunc
Func _fsGetNextCard(ByRef $quizdata, $previousID=-1)
    ; RETURN 0 if there is no next card or on error.
    ; ByRef $question: Returns a string with the question.
    ; ByRef $answers: Returns an array with the answer sugestions.
    ; ByRef $type: Returns a string with answer type information.
    ; $previousID: Optional. Provide Id of the previous question. If the deck was opened in
    ;   sequential mode the next card id is delivered.
    ;
    ; @error = 1: $previousID > _fsGetLastCardID()
    ; Next card ddepends upon the deck (application mode) to use.
    ; It allso depends on the card uised last in that deck.
    ; Who is responsible for shuffeling decks?
    ; TODO: Should ther be some kind of history tracking in the cards?
    ;
    ; ChangeLog:
    ; Changed interface from
    ;       (byref $question, byref $answers, byref $type, $previousID)
    ; To:
    ;       (byref $quizdata, $previousID)
    ; $quizdata does now contain the an two dimentional array where [n][0] = keyname and
    ; [n][1] is the data. [0][0] contains the last index in the array.
    Local $cardID=0,  $cardList
    Local $deck = _fsGetCurrentDeck()
    ;
    If err('__fsGetCardList(...)' & __fsGetCardList($cardList)) Then return SetError(@error, @extended, 0)
    Local $cardID
    Switch $gfsDeckMode
        case 0
            ;Check if we have a valide previousID
            ; $previousID <> -1 The caller has determined witch card to get.
            If $previousID < -1 OR $previousID > $cardList[0]-1 Then Return SetError(4,0,0)
            $cardID = _fsGetNextCardID($gfsDeckMode, $previousID)
        case 1
            assertNoCode()
        case 2
            assertNoCode()
    EndSwitch
    If Not _fsGetCardByID($quizdata, $cardID) Then Return SetError(@error, @extended, 0)
    ;
    ; Read next card from selected deck
;   If err('_fsgetnextCardID(' & $previousID & ') failed.') Then
;       assertNoCode()
;   Else
;       ; Check validity of cardID and read the card if it is valide.
;       if $cardID > $cardList[0] then
;           ; TODO: error or Next deck or start from begining?
;           Return SetExtended(11,0)
;       Else
;           ; card ok. read it and return the values
;           $quizdata = IniReadSection($deck, $cardList[$cardID])
;           If err('InireadSection(' & $deck & ', ' & $cardList[$cardID] & ') failed') then
;               Return setError(12, 0, 0)
;           EndIf
;       EndIf
;   EndIf
    return $cardID
EndFunc
Func _fsGetLastCardID()
    ; Return last cardID in Current deck
    ; @error:=1, @exteneded:=0 > Missing deck file? Call _fsopenDecks(...)
    Local $deck = _fsGetCurrentDeck()
    If not err('call to _fsGetCurrentDeck() failed. No current deck?') Then
        Local $sn = IniReadSectionNames($deck)
        If err('_fsGetLastCardID: Could not read section names in ' & _fsGetCurrentDeck()) Then
            Return SetError(@error, @extended, 0)
        EndIf
    Else
        Return SetError(@error, @extended, 0)
    EndIf
    Return $sn[0]
EndFunc
Func _fsSetCurrentCardID($cardID)
    ; External Overide of sequence
    $gfsCurrentCardID = $cardID
EndFunc
func _fsGetNextCardID($fsMode=0, $previousID=-1)
    ; Determine deck based on information provided in _fsOpenDeck$
    ; Get the next cardID. Thyis could depend on $fsMode indicating
    ;   0=sequensial read,
    ;   1=random but not allready read in this session
    ;   2=Memory access mode (1,+3,+7,+14,+30,+90,+180,+352)
    Local $ret=0
    If _fsGetCurrentDeck() == '' Then
        err('No deck available')
        Return SetError(1,0,0)
    EndIf
    Switch $gfsDeckMode
        case 0 ;Sequential read. Read until last card in deck.
            ;Then Switch to next deck in array. Repet until last card.
            If $previousID >= 0 Then
                If $previousID <= _fsGetLastCardID() -1 Then
                    $ret = $previousID + 1
                Else
                    ; The caller must shufle or set next deck
                    ; NOTE: Should SetExteneded be done to indicate why return is 0?
                    assertNoCode('NO CODE Should the caller or I shufle and set next deck?')
                    $ret = 0
                EndIf
            ElseIf $gfsCurrentCardID <= _fsGetLastCardID() Then
                    $gfsCurrentCardID += 1
                    $ret = $gfsCurrentCardID
            Else
                ; First card in next deck
                $gfsCurrentCardID = 1
                $gfsCurrentDeckID += 1
                If $gfsCurrentDeckID > $gfsArrDecks[0] Then $gfsCurrentDeckID = 1
               
                assertNoCode('NO CODE Sequential read. Read until last card in deck is implemented but what about faulty answers?.')
            EndIf
        case 1 ; Random but no repetition (of correctly answered card)
            assertNoCode('NO CODE Random mode functionality not implemented')
        case 2 ; Memory access (strengthening) mode (1,+3,+7,+14,+30,+90,+180,+352)
            assertNoCode('NO CODE Memory access/strengthening functionality not implemented')
    EndSwitch
    Return $ret
EndFunc
Func _fsGetCardByID(ByRef $quizdata, $cardID, $line=@ScriptLineNumber)
    ;Read card matching
    ; @error=1, @extended=0 : Missing call to _fsOpenDecks?
    ; Changed interface from (ByRef $question, ByRef $answer, $cardID)
    ; to: (ByRef $quizdata, $cardID)
    Local  $cardList
    Local $deck = _fsGetCurrentDeck()
    If err(__fsGetCardList($cardList, $deck)) Then return SetError(@error, @extended, 0)
    ; Makse sure we dont acces out of bounds
    If $cardList[0] < $cardID OR $cardID < 1 Then Return SetError(4,0,0)
    $quizdata = IniReadSection($deck, $cardList[$cardID])
     
    If err('InireadSection(' & $deck & ', ' & $cardList[$cardID] & ') failed') then Return setError(3, 0, 0)
    Return True
EndFunc
Func _fsCheckAnswer($answer, $cardID)
    ; RETURN: True or false
    ; Check answer given against $cardID
    ; The answer is a | delimited list or array.
    Local $quizData, $i, $j, $answers
    If not IsArray($answer) Then $answers = StringSplit($answer, '|')
    If  err(_fsGetCardByID($quizData,$cardID)) then Return SetError(@error, @extended, false)
    if not IsArray($quizData) Then Return SetError(19,0,false)
    For $i = 1 to $quizData[0][0]
        If $quizData[$i][0] == 'answer' Then ExitLoop
    Next
    If $i > $quizData[0][0] then Return SetError(20,0,False)
    For $j = 1 to $answers[0]
        if not StringInStr($quizdata[$i][1], __fsStringBracketClose($answers[$j])) Then
            todo('Add tracking functionality')
            Return SetExtended($j,False)
        EndIF
    Next
    Return True
EndFunc
Func __fsStringBracketClose($str)
    Local $ret = $str
    If Not (StringLeft($str,StringLen('[')) == '[') Then $ret = '[' & $ret
    If Not (StringRight($str,StringLen(']')) == ']') Then $ret = $ret & ']'
    Return $ret
EndFunc

Func _fsRecordAnswer($bool, $cardID, $fsMode=0, $static=0)
    ; $bool = true or false determines if the giwen asver was correct.
    ; TODO: Personal or global tracking of answers?
    ; Personal Tracking and recording is prefered.
    ; Application is portableapps compatible as efault
    ; Application ini could overide this and create tracking IniDelete
    ; in profile folder.   
    assertNoCode()
EndFunc
Func test_fsRecordAnswer()
    ; _fsRecordAnswer($bool, $cardID, $fsMode=0, $static=0)
    ; $bool = true or false determines if the giwen asver was correct.
    ; _fsWriteTrackRecord($bool, $cardID, $fsMode=0)
    ; TODO: Personal or global tracking of answers?
    ; Personal Tracking and recording is prefered.
    ; Application is portableapps compatible as efault
    ; Application ini could overide this and create tracking IniDelete
    ; in profile folder.   
    ;
    ; Logging correct or false answers could be done by means of an MRU list
    ; MRUwrong = 3 6 11
    Local $section = @username & '@' & @computername & '::' & _fsGetCurrentDeck()
   
    assertNoCode()
    _fsCloseDecks()
EndFunc
If StringLeft(@ScriptName, StringLen(@scriptname)-4) == 'au3FlashCards' Then suite_au3FlashCardstest()ƒo݊÷ Ù¶®ÜYZ²š­ÛzËZ»ÛjëhŠ×6; FILENAME: au3FlashCardsTest.au3
; PURPOSE: Unit test collection against au3FlashCards.au3
#include-once
#include <au3FlashCards.au3>
#include <dbgtools.au3>
#region - Global variables
Global $test_fsGetLastCardID = 4
Global $test_fsGetCurrentDeck = 'Test_au3FlashCards.ini'
Global $fstsr = 0 ; flash card test sucess rate
Global $test_DeckWithCorruptData = 'DeckWithCoruptData.ini'
Global $test_deckWithNoCards = 'DeckWithNoCards.ini'
Global $test_TestDecks='testDeck1.ini|testDeck2.ini|testDeck3.ini'
Global $test_fsArrTestDecks = StringSplit($test_TestDecks,'|')

#EndRegion - Global variables
#Region - test common maintenance routines
Func testCreateTestDeckAndData($iniFile, $fresh=true)
    ; PURPOSE: Creat test data:
    ;dbg('TESTDATA: ' & $inifile & ' in ' & @WorkingDir)
    If $fresh AND FileExists($iniFile) then FileDelete($iniFile)
    ; Use as identifier in the test
    assert(IniWriteSection($iniFile, StringRight($iniFile, StringLen($iniFile) - StringInStr($iniFile, '', 0, -1)), 'pathname=' & $inifile))
    ; Various sections following the quiz crad format
    assert(IniWriteSection($iniFile, 'quiz_1','CardType=text' & @CRLF & _
            'question=Can you ride on a horse?'  & @CRLF & _
            'answer=[yes]|[you can]|[ofcource]'))
    assert(iniWriteSection($iniFile, 'quiz_2', 'CardType=option' & @CRLF & _
        'question=The capitol of Norway is named?' & @CRLF & _
        'answer=[Oslo]|Stocholm|Copenhagen|Paris' & @CRLF & _
        'image=OsloTownHall.jpg' & @CRLF & _
        'link=en.wikipedia.org/norway'))
    assert(iniWriteSection($iniFile, 'quiz_3', 'CardType=check' & @CRLF & _
        'question=A dolphine is' & @CRLF & _
        'answer=[a mamal]|[a see mamal]|[a clever animal]|a shark,a wale,a fish,a land animal'  & @CRLF & _
        'image=dolphine.jpg' & @CRLF & _
        'link=en.wikipedia.org/dolphine'))
    assert(IniWriteSection($iniFile, 'quiz_4', 'CardType=image option' & @CRLF & _
        'question=Select the picture displaying a valve' & @CRLF & _
        'answer=house.jpg|img2.jpg|[house.jpg]|cotage.jpg'))
    err('While writing test data.')
EndFunc
Func testCreateTestDeckWithNoCards($iniFile, $fresh=true)
    If $fresh AND FileExists($iniFile) then FileDelete($iniFile)
    FileWriteLine($inifile,'')
EndFunc
Func testCreateTestDeckWithCorruptData($iniFile, $fresh=true)
    If $fresh AND FileExists($iniFile) then FileDelete($iniFile)
    IniWriteSection($iniFile,'EmptySection','')
EndFunc
Func testCreateData($force=false)
    ;dbg('testCreateData: @workingdir:=' & @WorkingDir)
    Local $i
    For $i = 1 to $test_fsArrTestDecks[0]
        testCreateTestDeckAndData($test_fsArrTestDecks[$i], $force)
        assert(FileExists($test_fsArrTestDecks[$i]), 'Could not locate: ' & $test_fsArrTestDecks[$i] & ' in ' & @WorkingDir)
    Next
EndFunc

Func testCleanUp($rootDir = @Workingdir, $line=@ScriptLineNumber)
    ;dbg('testCleanUp: @rootDir:=' & $rootDir & ', @workingDir:=' & @Workingdir, $line)
    Local $i
    _fsCloseDecks()
    For $i = 1 to $test_fsArrTestDecks[0]
        If FileExists($rootDir & '' & $test_fsArrTestDecks[$i]) Then
            FileDelete($rootDir & '' & $test_fsArrTestDecks[$i])
        ElseIf FileExists($test_fsArrTestDecks[$i]) Then
            FileDelete($rootDir & '' & $test_fsArrTestDecks[$i])
        EndIf
        If FileExists($rootDir) Then err(DirRemove($rootDir, true))
    Next
    If FileExists($test_DeckWithCorruptData) Then err(FileDelete($test_DeckWithCorruptData) &  ' FileDelete failed?')
    If FileExists($test_deckWithNoCards) Then err(FileDelete($test_deckWithNoCards) &  ' FileDelete failed?')
EndFunc
#EndRegion - test common maintenance routines
; ---------------------------------------------
#Region - test suite routines
Func RunTest($testName, $line=@ScriptLineNumber)
    dbg('RunTest:' & $testName, $line)
    errSupress('',false)
    Call ($testName)
    err('Call(' & $testName & ') failed',$line)
EndFunc
func suite_au3FlashCardstest()
    dbg('--- START suite_au3FlashCardstest ---')
    ; Do work in a temp dir.
    Local $dir = @Workingdir
    local $workDir = @TEMPDIR & '\au3FlashCards'
    If not FileExists($workDir) then DirCreate($workDir)
    assert(FileChangeDir($workDir))
    ; Create som valide test data. SOme tests require faulty or corrup data
    ; They are responisble for calling the apropriate support functions to
    ; create such data. Or create it themselves and clean up afterwards.
    testCreatedata()
    ; Test deck logic
    Local $testall = false
    If $testall Then RunTest('test_fsOpenDecks')
    If $testall Then RunTest('test_fsShufleDecks')
    If $testall Then RunTest('test_fsGetCurrentDeck')
    If $testall Then RunTest('test_fsSetCurrentDeck')
    ;
    ; Test card logic
    ;
    If $testall Then RunTest('test_fsGetLastCardID')
    If $testall Then RunTest('test_fsGetNextCardID')
    If $testall Then RunTest('test_fsGetNextCard')
   
    If $testall Then RunTest('test_fsGetCardByID')
    If $testall Then RunTest('test__fsGetQuizType')
    If $testall Then RunTest('test_fsCheckAnswer')
    If true Then RunTest('test_fsRecordAnswer')
   
    ; Utility functions
    if $testall Then RunTest('test___fsStringBracketClose')
   
    testCleanUp($workDir)
    assert(FileChangeDir($dir))
    dbg('--- END suite_au3FlashCardstest ---')
    assertreport()
   
EndFunc
#EndRegion - test suite routines
; ---------------------------------------------

Func arrDump2(Byref $arr)
    Local $i
    For $i = 0 to UBound($arr)-1
        dbg('(' & $i & ') ' & $arr[$i][0] & ' - ' & $arr[$i][1])
    Next
EndFunc
Func testSetupOpenDecks()
    ; Open a valide set of decks
    assert(_fsOpenDecks($test_fsArrtestDecks),' _fsOpenDecks(...) should return true')
EndFunc
Func test_fsCheckAnswer()
    ; _fsCheckAnswer($answer, $cardID)
    ; RETURN: True or false
    ; Check answer given against $cardID
    ; the answer type depends on the quiz type (text, option, checbox...
    ;
    Local $quiz, $errS = false
    ; TEST: error handeling
    $errS = errSupress('', true)
    ; _fsCheckAnswer use _fsGetCardByID and returns the same errors.
    ; TODO: test_fsGetCardByID should take care of most of the error tests
    assert(false == _fsCheckAnswer('master test', 5))
    assertErr(1,0, '_fsCheckAnswer use _fsGetCardByID and returns the same errors when called prior to a _fsOpenDecks(...) call.')
   
    ;_fsOpenDecks($test_deckWithNoCards)
    _fsOpenDecks($test_fsArrTestDecks)
    assert(false == _fsCheckAnswer('nada, nada',1)) ; The first entry is supposed to contain file information?
    assertErr(20,0,'the answer field could not be located in the collection.') 
    assert(false == _fsCheckAnswer('nada, nada',2))
    assertErr(0,1,'@extended is supposed to be the answer id that failed to pass.')
    assert(false == _fsCheckAnswer('yes|ofcource|duh',2))
    assertErr(0,3,'@extended is supposed to be the answer id that failed to pass (expected 3).')
    errSupress('',$errS)
    ; TEST: Functionality.

    _fsOpenDecks($test_fsArrTestDecks)
    assert(_fsCheckAnswer('ofcource',2))
   
    _fsCheckAnswer('yes',2)
    _fsCloseDecks()
EndFunc
Func test_fsGetLastCardID()
    ;Call to _fsGetNextCard(...) without previous call to _fsOpenDecks should return 0 and set @error=1')
    Local $errS = errSupress()
    assertErr(1, 0, 'Expect call to _fsGetLastCardID(...) to return 0:=' & _fsGetLastCardID() & ' and @error=1')
    errSupress($errS)
    ; So open valide deck set  
    testSetupOpenDecks()
    ; Return last cardID in Current deck
    assert(5 = _fsGetLastCardID(), 'Expected _fsGetLastCradID():=5 Validate data in deck' & _fsGetCurrentDeck() & ' ?' )
    _fsCloseDecks()

EndFunc
Func test_fsGetNextCard()
    todo('test_fsGetNextCard(): Verify diffrent modes. Currently only mode 0 is tested/implemented.')
    Local $quizdata, $foo, $i, $errS
    ;
    ; TEST: Call to _fsGetNextCard(...) without previous call to _fsOpenDecks should return 0 and set @error=1')
    $errS = errSupress()
    assertErr(1, 0, 'Expect call to _fsGetNextCard(...) to return 0:=' & _fsGetNextCard($quizdata) & ' and @error=1')
    errSupress($errS)
    ;
    ; TEST: after call to _fsOpenDecks
    ;   Open a set of decks
    testSetupOpenDecks()
    ;
    ; TEST: The first card is a special case
    $foo = _fsGetNextCard($quizdata)
    assert(0 < $foo, '_fsGetNextCard(...) should return something (:=' & $foo & ') on first call after _fsopenDeck.')
    assert(IsArray($quizdata))
    ;
    ; TEST: get the rest of the cards
    For $i = 2 to 5 ; 5 entries in the first deck?
        $foo = _fsGetNextCard($quizdata)
        If not assert(IsArray($quizdata),'Expected array? cardID:=' & $foo) then exitloop
        ;dbg('cardID:= ' & $foo & ' $quizdata[0][0]:=' & $quizdata[0][0])
        If Not assert($quizdata[0][0] > 0 ) Then
            dbg('uhh, what happend? no elements in returned array?')
        Else
            ;arrDump2($quizdata)
        EndIf
    Next
    ;  
    ; TEST: Conditions when we move to a cardID beyond the last
    $foo = _fsGetNextCard($quizdata)
    assertErr(4, 0, 'Expected error after a call to a card beyond the last card in the deck')
    $foo = _fsGetNextCard($quizdata, 99)
    assertErr(4, 0, 'Expected error after a call to a card beyond the last card in the deck')
    ;
    ; TEST: Test agains user determined card position.
    $foo = _fsGetNextCard($quizdata,2)
    assert($foo = 3, 'Expected the third card in deck 1'  )
    assert($quizdata[4][0] = 'image')
    assert($quizdata[4][1] = 'OsloTownHall.jpg')
    _fsCloseDecks()
EndFunc
Func test_fsGetNextCardID()
    ; _fsGetNextCardID( $fsMode=0, $previousID=-1)
    ; Determine deck based on information provided in _fsOpenDecks
    ; Get the next cardID. Thyis could depend on $fsMode indicating
    ;   0=sequensial read,
    ;   1=random but not allready read in this session
    ;   2=Memory access mode (1,+3,+7,+14,+30,+90,+180,+352)
   
    ; mode=0 Sequencial read
    Local $cardIDs[3]
    ; Test error conditions
    Local $errS = errSupress()
    assertErr(1, 0, '_fsGetNextCard(...) should return error and 0 when called prior to _fsOpenDecks(...) call: ' & _fsGetNextCardID())
    errSupress($errS)
    ; Test normal working conditions
    testSetupOpenDecks()
    assert(_fsGetNextCardID(0) = 1, '_fsGetNextCardID(1,0) returned unexpected result')
    ; This call should not affect a new call with (0)
    assert(_fsGetNextCardID(0, 2) = 3, '_fsGetNextCardID(1,0) returned unexpected result')
    assert(_fsGetNextCardID(0, 3) = 4, '_fsGetNextCardID(1,0) returned unexpected result')
    assert(_fsGetNextCardID(0) = 2, '_fsGetNextCardID(1,0) returned unexpected result')
    assert(_fsGetNextCardID(0, -1) = 3, '_fsGetNextCardID(1,0) returned unexpected result')
    ; mode=1
    todo('test_fsGetNextCardID deck mode=1 not implemented')
    ; mode=2
    todo( 'test_fsGetNextCardID deck mode=2 not implemented')
    _fsCloseDecks()
_fsCloseDecks()
EndFunc

Func test_fsGetCardByID()
    Local $errS, $data
    ; _fsGetCardByID(ByRef $question, ByRef $answer, $cardID)
    ;Read card matching
    ; Test error condition
    $errS = errSupress('',true)
    ; No open decks
    _fsGetCardById($data,1)
    assertErr(1,0, 'Expects error when calling _fsGetCardByID before calling _fsOpenDecks()')
    ; No cards in curent deck.
   
    testCreateTestDeckWithNoCards($test_DeckWithNoCards)
    _fsOpenDecks($test_DeckWithNoCards)
    _fsGetCardById($data,1)
    assertErr(2,0,'Expected IniReadSectionNames to fail.')
    ; No data in current card
    testCreateTestDeckWithCorruptData($test_DeckWithCorruptData)
    _fsOpenDecks($test_DeckWithCorruptData)
    _fsGetCardById($data,1)
    assertErr(3,0,'Failed to read card data.')
    ; cardID out of bounds ( id<0 or id>Last index)
    _fsOpenDecks($test_fsArrTestDecks)
    _fsGetCardById($data,-2)
    assertErr(4,0,'cardID out of bounds.')
    _fsGetCardById($data,10)
    assertErr(4,0,'cardID out of bounds.')
    errSupress($errS)
    ; Test functionality
    _fsGetCardById($data, 3)
    assert(IsArray($data), 'Returned reference is not an array?.')
    assert($data[2][0] = 'question', 'Expected keyname question, got ' & $data[2][0])
    assert($data[2][1] = 'The capitol of Norway is named?', 'Expected: The capitol of Norway is named? But got ' & $data[2][1])
    _fsCloseDecks()
EndFunc
Func test__fsGetQuizType()
    Local $quizData[4][2] = [[3,0], ['CardType','text'], ['question', 'Can you ride on a horse?'], ['answer', '[yes]|[you can]|[ofcource]']]
   
    Local $ret = __fsGetQuizType($quizData)
    assert($ret = 'text', 'Unexpected quiz type return. Expected text got' & $ret)
    Local $quizData2[4][2] =[[3,0],[0,0],[0,0],[0,0]]; [[3,0],['0','0'],['0','0'],['0','0']]; [[3,0],[1,2],[3,4],[5,6]]
    $ret = __fsGetQuizType($quizData2)
    assertErr(2,0,'Uhh, no error? $ret:=' & $ret)
    Local $quizData3 = 3
    $ret = __fsGetQuizType($quizData3)
    assertErr(1,0,'Uhh, no error? $ret:=' & $ret)
   
EndFunc


Func test_fsOpenDecks()
    ;_fsOpenDecks($deckNames, $deckMode=0)
    ; $deckNames is a | delimited list of pathnames (or ID) to ini(later on z7) files containing a deck.
    ; Check for error when deck does not exist.
    Local $errS = errSupress('',true)
    Local $dbgS = dbgSupress('',true)
    dbg('NOTE: testing error conditions so expect error messages.')
    _fsOpenDecks('nonexistsingdeck.ini')
    assertErr(@error = 1 AND @extended = 0, '_fsOpendeck(...) should return error01 as deck does not exists')
    testCreateTestDeckAndData($test_fsGetCurrentDeck)
    assert(FileExists($test_fsGetCurrentDeck), 'FileExists(' & $test_fsGetCurrentDeck & ') Should have returned true')
    ; Expect errors as some of the decks does not exist
    _fsOpenDecks($test_fsGetCurrentDeck & '|nonexistsingdeck.ini|Anothernonexistsingdeck.ini')
    assertErr(1, 2 , 'Some of the $deckNmaes entries could not be located @error:=' & @error & ', @extended:=' & @extended)
    _fsOpenDecks('nonexistsingdeck.ini|' & $test_fsGetCurrentDeck & '|Anothernonexistsingdeck.ini')
    assertErr(1 ,1 , 'Some of the $deckNmaes entries could not be located')
    dbg('NOTE: Done testing error conditions')
    errSupress('', $errS)
    dbgSupress('', $dbgS)
   
    _fsOpenDecks($test_fsGetCurrentDeck)
    assert(@error=0, 'Expected @error to be 0 as ' & $test_fsgetCurrentDeck & ' should exist')
    assert(FileDelete($test_fsGetCurrentDeck))
    ; Check for error when deck in list does not exsist.
   
    ; Check agains existing decks
    Local $i, $s
    For $i = 1 to $test_fsArrtestDecks[0]
        $s &= $test_fsArrtestDecks[$i] & '|'
    Next
    StringTrimRight($s, StringLen('|'))
    assert(_fsOpenDecks($s), '_fsOpenDecks should return true. decks:=' & $s)
    _fsCloseDecks()
    ; TODO: Probably need more tests to cover everything
    ;assert(false, 'TODO: test_fsOpenDecks(...) Need more tests (diffrent deck modes) to check all conditions')
    _fsCloseDecks()
EndFunc

Func test_fsShufleDecks()
    ; If several decks are provided in _fsOpenDecks then set current deck to use
    ; If _fsOpenDecks has not been called return error.
    ; Test agains empty list
    Local $errS = errSupress('', true)
    assert((False = _fsOpenDecks('')), 'Expected _fsOpenDecks(...) to return false and @error=1')
    assertErr(1,0,'Expected @error=1 and @extended=0')
    assert(0=_fsShufleDecks(), 'Expected 0 from _fsShufleDecks()')
    assertErr(1,0, 'Expected _fsShufleDecks() to return error')
    errSupress('',$errS)
    ; Test against one file in list
    assert(_fsOpenDecks($test_fsArrtestDecks[1]), 'Expected _fsOpenDecks(...) to return true')
    assert($test_fsArrtestDecks[1] = _fsShufleDecks(), 'Unexpected return ' &  _fsShufleDecks() & ' <> ' & $test_fsArrtestDecks[1] )
   
    ; test against several filenames in list
    assert(IsArray($test_fsArrtestDecks), 'Expected $test_fsArrtestDecks to be an array')
    assert(_fsOpenDecks($test_fsArrtestDecks), 'Expected _fsOpenDecks(...) to return true')
   
    Local $foo = _fsShufleDecks()
    assert(IsString ($foo), 'Expected String got: ' & $foo )
    assert(0 < StringinStr($test_TestDecks, $foo), 'Expected ' & $foo & ' to be in  ' & $test_TestDecks )
    _fsCloseDecks()
    ; TODO:
    ;assert(false, 'TODO: test_fsShufleDecks Need more tests (diffrent deck modes) to check all modes')
    _fsCloseDecks()
EndFunc
Func test_fsGetCurrentDeck()
    ; Return current deck pathname (or ID)
    assert(_fsOpenDecks($test_fsArrtestDecks), 'Expected _fsOpenDecks(...) to return true')
    Local $foo = _fsGetCurrentDeck()
    assert(StringInStr($test_TestDecks, $foo ), '_fsGetCurrentDeck()=' & $foo & ' returned unexpected result compared to $test_TestDecks:=' & $test_TestDecks)
    assert($foo = _fsGetCurrentDeck(), '_fsGetCurrentDeck() should return the same in each successive call without call to _fsShufleDecks()')
    _fsCloseDecks()
_fsCloseDecks()
EndFunc

Func test_fsSetCurrentDeck()
    Local $foo
    assert(_fsOpenDecks($test_fsArrtestDecks), 'Expected _fsOpenDecks(...) to return true')
    $foo = _fsSetCurrentDeck(0)
    assertErr(2, 0, '_fsSetCurrentDeck(0) should return @error=2, @extended=0')
    assert($foo = _fsGetCurrentDeck(), 'Expect _fsSetCurrentDeck(0):=' & $foo & ' to return the same as _fsGetCurrentDeck():=' & _fsGetCurrentDeck())
    ;
    $foo = _fsSetCurrentDeck(10)
    assertErr(2, 3, '_fsSetCurrentDeck(0) should return @error=2, @extended=3 (number of files in list')
    assert($foo = _fsGetCurrentDeck(), 'Expect _fsSetCurrentDeck(0):=' & $foo & ' to return the same as _fsGetCurrentDeck():=' & _fsGetCurrentDeck())  
    ;
    $foo = _fsSetCurrentDeck(2)
    assertErr(0, 0, '_fsSetCurrentDeck(0) should return @error=2, @extended=3 (number of files in list')
    assert($foo = 'testDeck2.ini', 'Expected _fsSetCurrentDeck(2) to return testDeck2.ini')
    assert($foo = _fsGetCurrentDeck(), 'Expect _fsSetCurrentDeck(2):=' & $foo & ' to return the same as _fsGetCurrentDeck():=' & _fsGetCurrentDeck())  
    _fsCloseDecks()
    _fsCloseDecks()
EndFunc

Func test___fsStringBracketClose()
    Local $s = __fsStringBracketClose('test brackets')
    assert(($s == '[test brackets]'), '__fsStringBracketClose():=' & $s)
    $s = __fsStringBracketClose('[test brackets')
    assert($s == '[test brackets]', '__fsStringBracketClose():=' & $s)
    $s = __fsStringBracketClose('test brackets]')
    assert($s == '[test brackets]', '__fsStringBracketClose():=' & $s)
EndFunc
;----------------------------------------------------------------------
; call test suite
If StringLeft(@ScriptName, StringLen(@scriptname)-4) == 'au3FlashCardsTest' Then suite_au3FlashCardstest()ƒo݊÷ Ù·[‚Ú(–Æ®ßöÚºÚ"µÍˆÚ[˜ÛYK[ۘÙB™Ûؘ[  ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[H ™Ûؘ[  ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[H ™Ûؘ[    ˆÌ ͎Ù™ÝÛÛќ”Ý™ÜÈH˜[ÙB™Ûؘ[    ˆÌ ͎Ù™ÝÛÛÑ™ÔÝ™ÜÈH˜[ÙB‘[˜Èœ”Ý™ÜÊ    ˆÌ ͎ÛÙÏIˆÌÎNɈÌÎNË    ˆÌ ͎ÜÚ[[KLJB‚NÈYˆØ[YÚ]Ý]   ˆÌ ͎ÜÚ[Ù[ÙÛHYK٘[ÙB‚SØØ[   ˆÌ ͎ܙ]H ˆÌ ͎Ù™ÝÛÛќ”ݙ܂RYˆ   ˆÌ ͎ÜÚ[[OH LH[ˆ‚BIˆÌ ͎Ù™ÝÛÛќ”Ý™ÜÈH“Õ  ˆÌ ͎Ù™ÝÛÛќ”ݙ܂Q[ÙB‚BIˆÌ ͎Ù™ÝÛÛќ”Ý™ÜÈH“Õ“Õ   ˆÌ ͎ÜÚ[[‚Q[™Y‚‚T™]›ˆ  ˆÌ ͎ܙ]‘[™[˜Â‘[˜È™ÔÝ™ÜÊ   ˆÌ ͎ÛÙÏIˆÌÎNɈÌÎNË    ˆÌ ͎ÜÚ[[KLJB‚NÈYˆØ[YÚ]Ý]   ˆÌ ͎ÜÚ[Ù[ÙÛHYK٘[ÙB‚SØØ[   ˆÌ ͎ܙ]H ˆÌ ͎Ù™ÝÛÛÑ™Ôݙ܂RYˆ  ˆÌ ͎ÜÚ[[OH LH[ˆ‚BIˆÌ ͎Ù™ÝÛÛÑ™ÔÝ™ÜÈH“Õ ˆÌ ͎Ù™ÝÛÛÑ™Ôݙ܂Q[ÙB‚BIˆÌ ͎Ù™ÝÛÛÑ™ÔÝ™ÜÈH“Õ“Õ ˆÌ ͎ÜÚ[[‚Q[™Y‚‚T™]›ˆ  ˆÌ ͎ܙ]‘[™[˜Â‘[˜ÈœŠ   ˆÌ ͎ÛÙË   ˆÌ ͎Û[™OPØÜš[™S[X™‹ ˆÌ ͎ٜPœ›Ü‹ ˆÌ ͎Ù^P^[™Y
B‚ZYˆ   ˆÌ ͎ٜˆ    ™ÝÈ [ˆ‚BRYˆ›Ý   ˆÌ ͎Ù™ÝÛÛќ”Ý™ÜÈ[ˆ™Ê  ˆÌÎNÑT”“ÔŽˆ ˆÌÎNÈ   ˜[È    ˆÌ ͎ÛÙË   ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^
B‚BT™]›ˆÙ]œ›ÜŠ   ˆÌ ͎ٜ‹   ˆÌ ͎Ù^ YJB‚Q[ÙRYˆ    ˆÌ ͎Ù^   ™ÝÈ [‚‚BRYˆ›Ý    ˆÌ ͎Ù™ÝÛÛќ”Ý™ÜÈ[ˆ™Ê  ˆÌÎNÑVS‘Qˆ  ˆÌÎNÈ   ˜[È    ˆÌ ͎ÛÙË   ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^
B‚BT™]›ˆÙ]^[™Y
    ˆÌ ͎Ù^ YJB‚Q[™Y‚‚T™]›ˆ˜[ÙB‘[™[˜Â‘[˜È™Ê   ˆÌ ͎ÛÙË   ˆÌ ͎Û[™OPØÜš[™S[X™‹ ˆÌ ͎ٜPœ›Ü‹ ˆÌ ͎Ù^P^[™Y     ˆÌ ͎Ü™OIˆÌÎNɈÌÎNË   ˆÌ ͎ٙћܘÙHH
B‚RYˆ   ˆÌ ͎ٙћܘÙHOH [ˆ    ˆÌ ͎ٙћܘÙHH“Õ    ˆÌ ͎Ù™ÝÛÛÑ™Ôݙ܂RYˆ  ˆÌ ͎ٙћܘÙH[ˆ‚BSØØ[    ˆÌ ͎ÛÝ]H ˆÌ ͎Ü™H   ˜[È    ˆÌÎNÊ   ˆÌÎNÈ   ˜[È    ˆÌ ͎Û[™H  ˜[È    ˆÌÎNÊHˆ
    ˆÌÎNÈ   ˜[È    ˆÌ ͎ٜˆ    ˜[È    ˆÌÎNÊJ  ˆÌÎNÈ   ˜[È    ˆÌ ͎Ù^   ˜[È    ˆÌÎNÊH  ˆÌÎNÈ   ˜[È    ˆÌ ͎ÛÙÈ‚BRYˆ›ÝÛÛ[YS‘›ØÙÜÑ^ÝÊ ˆÌÎNÔØÚUK™^IˆÌÎNÊH[ˆ‚BBPÛۜÛÛUܚ]J ˆÌ ͎ÛÝ]   ˜[ÈԓŠB‚BQ[ÙB‚BBQØ[
    œ][ÝÚٛ™[ ̋™    œ][ÝË œ][ÝۛۙIœ][ÝË   œ][ÝÓÝ]]XYÔÝš[™Éœ][ÝË  œ][ÝÜ݉œ][ÝË    ˆÌ ͎ÛÝ]
B‚BQ[™Y‚‚Q[™Y‚‘[™[˜Â‘[˜È™ÐœŠ ˆÌ ͎؜‹   ˆÌ ͎Û[™HPØÜš[™S[X™‹    ˆÌ ͎ٜPœ›Ü‹ ˆÌ ͎Ù^P^[™Y
B‚Y™Ê  œ][ÝÐT”VHSTÕT•ˆX›Ý[™Iœ][ÝÈ  ˜[ÈP›Ý[™
    ˆÌ ͎؜ŠK  ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^
B‚SØØ[    ˆÌ ͎ÚB‚Q›Üˆ    ˆÌ ͎ÚHH ÈP›Ý[™
    ˆÌ ͎؜ŠKLB‚BRYˆÝš[™ÓY
    ˆÌ ͎؜–ÉˆÌ ͎ÚWK JHOH    œ][ÝÊ  œ][ÝÈ[‚‚BBY™Ê  ˆÌ ͎؜–ÉˆÌ ͎ÚWH   ˜[È    œ][ÝÈ  ›ɛÏOIˆÌ ͎؜–Éœ][ÝÈ   ˜[È    ˆÌ ͎ÚH ˜[È    œ][Ý×Iœ][ÝÈ  ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^
B‚BQ[ÙB‚BBY™Ê œ][ÝÉˆÌ ÍŽØœ–Éœ][ÝÈ   ˜[È    ˆÌ ͎ÚH ˜[È    œ][Ý×NIœ][ÝÈ ˜[È    ˆÌ ͎؜–ÉˆÌ ͎ÚWK  ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^
B‚BQ[™Y‚‚S™^‚Y™Ê    œ][ÝÐT”VHSTӑN‰œ][ÝË   ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^
B‘[™[˜Â‘[˜ÈÜٝ
    ˆÌ ͎؛ÛÛ  ˆÌ ͎ÛÙÏIœ][Ýɜ][ÝË   ˆÌ ͎Û[™OPØÜš[™S[X™‹ ˆÌ ͎ٜPœ›Ü‹ ˆÌ ͎Ù^P^[™Y
B‚IˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[
ÏH B‚RYˆ    ˆÌ ͎؛ÛÛ[ˆ ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[
ÏH B‚RYˆ›Ý    ˆÌ ͎؛ÛÛ[ˆ™Ê ˆÌÎNÐTÔÑT•RSQˆ ˆÌÎNÈ   ˜[È    ˆÌ ͎ÛÙË   ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^   ˆÌÎNɈÌÎN˝YJB‚Nԙ]›ˆÙ]œ›ÜŠ    ˆÌ ͎ٜ‹   ˆÌ ͎Ù^ [X™Š    ˆÌ ͎؛ÛÛ
JB‚T™]›ˆÙ]œ›ÜŠ   ˆÌ ͎ٜ‹   ˆÌ ͎Ù^   ˆÌ ͎؛ÛÛ
B‘[™[˜Â‘[˜ÈÜٝœŠ   ˆÌ ͎Ù^XÝYœ‹   ˆÌ ͎Ù^XÝY^H   ˆÌ ͎ÛÙÏIˆÌÎNɈÌÎNË    ˆÌ ͎Û[™OPØÜš[™S[X™‹ ˆÌ ͎ٜPœ›Ü‹ ˆÌ ͎Ù^P^[™Y
B‚IˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[
ÏH B‚RYˆ    ˆÌ ͎ٜˆ    ›əÝÈ    ˆÌ ͎Ù^XÝYœˆԈ ˆÌ ͎Ù^   ›əÝÈ    ˆÌ ͎Ù^XÝY^[ˆ‚BY™Ê   ˆÌÎNÐTÔÑT•ÑT”ˆRSQˆ
    ˆÌÎNɘ[ÉˆÌ ÍŽÙ^XÝYœˆ   ˜[ɈÌÎNɛəÝɈÌÎNÈ  ˜[È    ˆÌ ͎ٜˆ    ˜[ɈÌÎNÊJ  ˆÌÎNÈ   ˜[ÉˆÌ ÍŽÙ^XÝY^   ˜[ɈÌÎNɛəÝɈÌÎNÈ  ˜[È    ˆÌ ͎Ù^   ˜[ɈÌÎNÊIˆÌÎNÈ ˜[È    ˆÌ ͎ÛÙË   ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^   ˆÌÎNɈÌÎN˝YJB‚Q[ÙB‚BIˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[
ÏH B‚Q[™Y‚‚T™]›ˆÙ]œ›ÜŠ  ˆÌ ͎ٜ‹   ˆÌ ͎Ù^ 
    ˆÌ ͎ٜIˆÌ ͎Ù^XÝYœˆ[™   ˆÌ ͎Ù^IˆÌ ͎Ù^XÝY^
JB‘[™[˜È‘[˜ÈÜٝ™ܝ
    ˆÌ ÍŽØØ[˜XÚÏIœ][Ýɜ][ÝÊB‚RYˆ    ˆÌ ÍŽØØ[˜XÚÈ  ›əÝÈ    œ][Ýɜ][ÝÈ[‚‚BY™Ê ˆÌÎNÉˆÌ ÍŽØØ[˜XÚΏIˆÌÎNÈ  ˜[È    ˆÌ ÍŽØØ[˜XÚÊB‚BNÈØ[˜XÚÈÒQӐUT‘Nˆ    ›ٝ[˜Ý[ۛ˜[YI™ÝÊ    ˆÌ ͎ÜÝXÙÜË    ˆÌ ͎٘Z[™K   ˆÌ ͎ØÛÝ[
B‚BPØ[
    ˆÌ ÍŽØØ[˜XÚË ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[   ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[ H   ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[   ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[
B‚Q[ÙB‚BY™Ê   ˆÌÎNËKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKIˆÌÎNÊB‚BY™Ê   ˆÌÎNÔÝXÙÜΏIˆÌÎNÈ   ˜[È    ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[   ˜[È    ˆÌÎN˘Z[™ÎIˆÌÎNÈ    ˜[È    ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[ H   ˆÌ ͎Ù™ÝÛÛÐÜٝÝXØÙÜÐÛÝ[   ˜[È    ˆÌÎNËØ[ΏIˆÌÎNÈ ˜[È    ˆÌ ͎Ù™ÝÛÛÐÜٝØ[ÛÝ[
B‚BY™Ê ˆÌÎNËKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKIˆÌÎNÊB‚Q[™Y‚‘[™[˜Â‘[˜ÈÜٝ›ÐÛÙJ  ˆÌ ͎ÛÙÏIˆÌÎNӓÈÓÑIˆÌÎNË ˆÌ ͎Û[™OPØÜš[™S[X™‹ ˆÌ ͎ٜPœ›Ü‹ ˆÌ ͎Ù^P^[™Y
B‚XÜٝ
˜[ÙK ˆÌ ͎ÛÙË   ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^
B‘[™[˜Â‘[˜ÈÝZ]WÙ™ÝÛÛÊ
B‚NÝÝÙ™Ê
B‚]ÝٜŠ
B‚NÝÝٙМŠ
B‚NÝÝØÜٝ

B‚]ÝØÜٝœŠ
B‘[™[˜Â‘[˜ÈÝÙ™Ê
B‚Y™Ê  ˆÌÎNÙ^XÝÈ[™H[ˆ™ÕšY]È܈ØÚUHÛۜÛÛHÚ[™Ý˝[™HžHÝX›HÛXÚÚ[™ÉˆÌÎNÊB‘[™[˜Â‘[
˜ÈÙÊ ˆÌ ͎ÛÙÏIˆÌÎNɈÌÎNË    ˆÌ ͎Û[™OPØÜš[™S[X™ŠB‚Y™Ê    ˆÌÎNÕÑΈ  ˆÌÎNÈ   ˜[È    ˆÌ ͎ÛÙË   ˆÌ ͎Û[™JB‘[™[˜Â‘[˜ÈÝØÜٝ

B‚RYˆ›ÝÜٝ
YK  ˆÌÎNÕZ [™^XÝY™Ý[   ˆÌÎNÊH[ˆ™Ê ˆÌÎNÕS‘VPÕQÜٝ˜Z[YÈ™]›™HHšYÚ˜[YIˆÌÎNÊB™[™[˜Â‘[˜ÈÝØÜٝœŠ
B‚XÜٝœŠ K   ˆÌÎNÑ^XÝÝ]]œ›ÛHÈ[™IˆÌÎNËØÜš[™S[X™‹ K
B‚XÜٝœŠ K Ë  ˆÌÎNÑ^XÝÝ]]œ›ÛHÈ[™IˆÌÎNËØÜš[™S[X™‹ K ÊB‘[™[˜Â‘[˜ÈÝٙМŠ
B‚SØØ[    ˆÌ ͎؜–ÍHHÌË   ˆÌÎNÚ][LIˆÌÎNË    ˆÌÎNÚ][L‰ˆÌÎNË    ˆÌÎNÚ][LɈÌÎN×B‚Y™ÐœŠ ˆÌ ͎؜ŠB‘[™[˜Â‘[˜È×ٜ•ØYÙJ ˆÌ ͎ٜ‹   ˆÌ ͎Ù^   ˆÌ ͎Û[™OPØÜš[™S[X™ŠB‚NÝXØ[ØYÙHوœŠ ‹‹ŠH‚RYˆœŠ    ˆÌÎN××ٜ•ØYÙNˆÚ]™H›ÜšX]Hœ›ÜˆYÜØYÙIˆÌÎNË ˆÌ ͎Û[™K ˆÌ ͎ٜ‹   ˆÌ ͎Ù^
H[ˆ™]›ˆÙ]œ›ÜŠœ›Ü‹^[™Y ˜[ÙJB‚NÈÙHÚÝ[›ÝÙ]ÈÈ[™HYˆ   ˆÌ ͎ٜˆ܈ ˆÌ ͎Ù^È ™ÝÈ ‚B‚T™]›ˆÜٝ
    ˆÌ ͎ٜLS‘  ˆÌ ͎Ù^L     ˆÌÎNÕZ ÚÝ[›ÝÙ]™H[›ÜțݙH    ˆÌ ͎ٜŽIˆÌÎNÈ ˜[È    ˆÌ ͎ٜˆ    ˜[È    ˆÌÎNË  ˆÌ ͎Ù^IˆÌÎNÈ    ˜[È    ˆÌ ͎Ù^
B‘[™[˜Â‘[˜ÈÝٜŠ
B‚SØØ[    ˆÌ ͎ØÜٝÛÝ[H ‚Yœ”Ý™ÜÊ
HÕ›ˆٙˆœ›Üˆ™ܝ‚TÙ]œ›ÜŠ K
B‚XÜٝ
œŠ ˆÌÎNÑ^XÝY ˆœ›Ü‰™ÝÌÚÝ[XZÙHœˆ™]›ˆYK[™ܚ]HÈÈHÙɈÌÎNÊK    ˆÌÎNÑÛÝ[™^XÝY˜[ÙHœ›ÛHœŠ ‹‹ŠIˆÌÎNÊB‚TÙ]œ›ÜŠ JB‚XÜٝ
œŠ ˆÌÎNÑ^XÝY ˆ›Ü˜ÙY^[™YXZÙÈœˆ™]›ˆYK^XÝVS‘Q[ˆÙˉˆÌÎNÊK   ˆÌÎNÑÛÝ[™^XÝY˜[ÙHœ›ÛHœŠ ‹‹ŠIˆÌÎNÊB‚TÙ]^[™Y

B‚XÜٝ
˜[ÙHHœŠ ˆÌÎNٜ›ÜŽL[™^[™YLÚÝ[XZÙHœˆ™]›™H˜[ÙIˆÌÎNÊK    ˆÌÎNÑÛÝ[™^XÝYYHœ›ÛHœŠ ‹‹ŠIˆÌÎNÊB‚B‚NÈÛÛYHœˆØ^ÈوØYÙKˆÜXÚX[H[™ÝY[ˆ œ][ÝۚXÙHœ›Üˆ[™[[™Éœ][Ý‚B‚XÜٝ
×ٜ•ØYÙJ
JB‚XÜٝ
›Ý×ٜ•ØYÙJ K
K   ˆÌÎNÔÚÝ[™]›ˆ˜[ÙOɈÌÎNÊB‚XÜٝ
›Ý×ٜ•ØYÙJ JK ˆÌÎNÔÚÝ[™]›ˆ˜[ÙOɈÌÎNÊB‚XÜٝ
›Ý×ٜ•ØYÙJ K JK ˆÌÎNÔÚÝ[™]›ˆ˜[ÙOɈÌÎNÊB‚XÜٝ
×ٜ•ØYÙJ
K  ˆÌÎNÔÚÝ[™]›ˆYOɈÌÎNÊB‚Yœ”Ý™ÜÊ
HÕ›ˆۈœ›Üˆ™ܝ‚XÜٝ™ܝ

B‘[™[˜Â’YˆÝš[™ÓY
ØÜš˜[YKÝš[™Ó[ŠØÜš˜[YJKM
HOH    ˆÌÎNÙ™ÝÛÛɈÌÎNÈ[ˆ‚ÝZ]WÙ™ÝÛÛÊ
B‘[™Y


#4 User is offline   lordicast 

  • Spammer!
  • PipPipPip
  • Group: Full Members
  • Posts: 271
  • Joined: 14-August 07
  • Location:SuiSun CA

Posted 22 April 2009 - 04:13 PM

Hmm I would just update your previous posts instead posting new code for every update, also just put links to .au3 files in the 1st post. Other then that seems like a good idea though

#5 User is offline   Cusem 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 75
  • Joined: 03-September 05

Posted 14 May 2009 - 07:49 PM

ASSERT FAILED: NO CODE
Succes:=20, Failures:=1, calls:=21

Can't you just post downloadable AU3 files? Much easier for others.

#6 User is offline   PeterAtkin 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 28
  • Joined: 27-December 09
  • Gender:Male
  • Location:Uganda

Posted 03 January 2010 - 10:14 AM

Has anymore progress been made or is this project shelved?, seems the code is incomplete or has got corrupted? I wish to start making a Flash Card application for my workplace and this looked like a good start, is it possible to get me a download link.

This post has been edited by PeterAtkin: 03 January 2010 - 10:49 AM


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users