Results 1 to 3 of 3

Thread: Proggie Procedure

  1. #1
    Join Date
    Mar 2009
    Location
    Ireland
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Proggie Procedure

    Heya...!

    I was looking at some scripts a week ago, and I saw one that had a proggie like

    WriteLn(Dupn('Script worked for '+TimeFromMark(T), 5));

    i didnt know what it was for, so i experimented...

    turned out it was for the spaces at the side so a proggie box wouldn't go out of shape

    example
    Code:
       |    1 digit         |
       |    2 digits         |
       |    3 digitsz         |
       |    1 digit         |
    I thought it was pretty good, so now i want to use it, but I cant find that script anywhere...

    So can someone clarify this procedure/function for me

    thanks a million

  2. #2
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Theres a function called Padr:

    SCAR Code:
    function Padr(s: string, i: integer): string

    Which basically puts a certain amount of chars in the WriteLN line.

    Example:

    SCAR Code:
    WriteLN(Padr('| Text...', 20)'|');

    Will have 20 chars (incl. spaces) until the second '|'.

    Sorry if that didn't make any sense

  3. #3
    Join Date
    Mar 2009
    Location
    Ireland
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah thanks, thats it...

    I just couldnt find the script that had it

    thanks


    EDIT:

    You forgot a '+' after the Padr Function...
    Last edited by mc_teo; 04-09-2009 at 09:46 PM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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