-- marquee function Marquee(mString, mDelay) local length = string.len(mString) for i = 1,length+12 do local mRight = "" local mIddle = " " local mLeft = "" -- right for j = i-5,i do if j <= 0 then mRight = mRight .. " " end if j > 0 and j <= length then mRight = mRight .. string.sub(mString, j, j) end if j > length then mRight = mRight .. " " end end -- middle j = i - 6 if j > 0 and j <= length then mIddle = string.sub(mString, j , j) end -- left for j = i-12,i-7 do if j <= 0 then mLeft = mLeft .. " " end if j > 0 and j <= length then mLeft = mLeft .. string.sub(mString, j, j) end if j > length then mLeft = mLeft .. " " end end SetRightDigits(mRight) SetGearDigit(mIddle) SetLeftDigits(mLeft) SLISendReport(1) SLISleep(mDelay) end end