PennController for IBEX › Forums › Support › Displaying n words on screen › Reply To: Displaying n words on screen
May 15, 2023 at 6:22 am
#10588
Jeremy
Keymaster
Hi,
Just add .failure( getTimer("recording").stop() )
to the test on the index for the next 10 words:
newKey("NEXT", " ") .callback( getVar("nextWordStartsAt").test.is(v=>v<row.Words.split('_').length).success( getVar("listOfWords") .set(getVar("nextWordStartsAt")) .set(v=>row.Words.split('_').slice(v,v+10).join("<br>")) , getText("words").text( getVar("listOfWords") ) , getVar("nextWordStartsAt").set(v=>v+10) ) // stop the timer if all the words have been exhausted .failure( getTimer("recording").stop() )
Jeremy