Subj : Some programming help To : All From : Sean Dennis Date : Thu Jul 04 2019 12:40:33 Hello All, I am trying to write a procedure in TP that will display a text string in random colors except that the color selection is only run once. I know it's a logic error but I can't seem to see it with my own eyes. This is for my doorkit so there's some proprietary commands in here but this is what I have so far: { ------------------------------------------------------------------- PROCEDURE SRFColor (S: String); Displays a text string in random colors ------------------------------------------------------------------- } Procedure SRFColor(S : String); Var SLen : Byte Absolute S; N, X : Integer; Begin For N := 1 To SLen Do Begin Repeat Randomize; X := Random(15); Until ( X >= 1); If Loc Then Begin TextColor(X); Write(S[N]); End Else Begin fk_Textforeground(X); fk_Write(S[N]); End; End; NL; End; I think it's the "X := Random(15)" line that isn't right. Any help is appreciated. Later, Sean .... If at first you don't succeed, you're doing about average. --- GoldED+/LNX 1.1.5-b20180707 * Origin: Outpost BBS * Limestone, TN, USA (618:618/1) .