AT2k Design BBS Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to Computer Support/Help/Discussion...  <--  <--- Return to Home Page
   Networked Database  Computer Support/Help/Discussion...   [124 / 1628] RSS
 From   To   Subject   Date/Time 
Message   Sean Dennis    Nelgin   Some programming help   July 22, 2019
 12:26 PM *  

Hello Nelgin,

20 Jul 19 14:05 at you wrote to me:

 Ne> Do you mean that a single line of text should contain different
 Ne> colored letters or that each time it is run the line will be a
 Ne> different color?

The first concept.

Here's the code I came up with that works...this is from my own personal 
doorkit so there are a few custom routines in there as well as calls for 
FKFOSSIL, the doorkit I use.

{ -------------------------------------------------------------------
  PROCEDURE SRFColor (S : String; Centered : Boolean);
  Displays a text string in random colors
  ------------------------------------------------------------------- }
Procedure SRFColor(S : String; Centered : Boolean);
Var
  SLen : Byte Absolute S;
  N, TLen, X : Integer;
Begin
  Randomize;
  If Centered Then
    Begin
      TLen := 40 - (Length(S) Div 2);
      If Loc Then GotoXY(TLen, WhereY) Else fk_GotoXY(TLen, WhereY);
    End;
  For N := 1 To SLen Do
    Begin
      Repeat
        X := 0;
        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;

Later,
Sean

... Nothing is free.  Even age.  Age is the fee God charges for life.
--- GoldED+/LNX 1.1.5-b20180707
 * Origin: Outpost BBS * Limestone, TN, USA (618:618/1)
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to Computer Support/Help/Discussion...  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.0156 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.1.241108