Results 1 to 9 of 9

Thread: WriteProggy(Scriptname, authour, version:String; Lines:TStringArray);

  1. #1
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default WriteProggy(Scriptname, authour, version:String; Lines:TStringArray);

    SCAR Code:
    Procedure WriteProggy(Scriptname, authour, version:String; Lines:TStringArray);
    var
      I, II:integer;
    begin
      For II:=1 to high(Lines)do
      If Max(I, Length(Lines[I])) = Length(Lines[I])then
        I:=Length(Lines[I]);
      If I < Length(Scriptname) then
        I:=Length(Scriptname);
      Writeln('/'+Replicate('-', I)+'\');
      Writeln('|'+Padr(ScriptName, I)+'|');
      Writeln('|'+Padr('By:'+authour, I)+'|');
      Writeln('|'+Padr('Version:'+version, I)+'|');
      Writeln('|'+Replicate('-', I)+'|');
      For II:=0 to high(Lines)do
        Writeln('|'+Padr(Lines[II], I)+'|');
      Writeln('\'+Replicate('-', I)+'/');
    end;

    Outputs a really nice proggy like this:
    SCAR Code:
    WriteProggy('Ess miner', 'wizzup', '1.0', ['Ess mined:235', 'Banked:23']);

    Makes this:
    SCAR Code:
    /-------------\
    |Ess miner    |
    |By:wizzup    |
    |Version:1.0  |
    |-------------|
    |Ess mined:235|
    |Banked:23    |
    \-------------/

  2. #2
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quite good.

    Is there a way you can center the name of the script? I think it'd look better that way :P. Beyond that, no suggestions here.

  3. #3
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you just add spaces when you enter it and it's cool


  4. #4
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If we use this Procedure, do we need to credit you?
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  5. #5
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Yes

  6. #6
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    , kind of a stupid question, was tired.
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Why not use
    SCAR Code:
    function Replicate(c: Char; I: LongInt): string;
    instead of PadK?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  8. #8
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add this to Misc please. Or Globals, Setup, or wherever it needs to be added.

  9. #9
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    Why not use
    SCAR Code:
    function Replicate(c: Char; I: LongInt): string;
    instead of PadK?
    Did not know that function existed. Updated

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 03-30-2008, 01:40 PM
  2. Samoates1112's Bow String Maker (Version One)
    By samoates1112 in forum RS3 Outdated / Broken Scripts
    Replies: 20
    Last Post: 01-06-2008, 09:30 PM
  3. SRLPlayerForm and TStringArray
    By rotflmfwao in forum OSR Help
    Replies: 3
    Last Post: 08-21-2007, 08:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •