Results 1 to 3 of 3

Thread: Question

  1. #1
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Question

    So there are scripts that include breaks now, like, stop after every 20 minutes and break for 30 minutes, and i do check the debug box to see what's going on and it will say taking scheduled 30 minute break, my question is, is it possible to add like a GetTime function or procedure i could use that it gets when it breaks? That way when i look at the debug box it says like, "Taking 30 minute break, time started (insert real time here)

  2. #2
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Use this

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    procedure AddString(var S: String; Count: Integer; Text: String);
    begin
      if (Count > 0) then
        S := S + IntToStr(Count) + Text;
    end;

    procedure TakeBreak(Time: Integer);
    var
      H, M, S, G: Integer;
      SL: String;
    begin
      MarkTime(G);
      Writeln('Sleeping...');
      while (Time > TimeFromMark(G)) do
      begin
        Wait(1000);
        ConvertTime(Time - TimeFromMark(G), H, M, S);
        SL := '';
        if (H > 0) then
        AddString(SL, H, ' Hours, ');
        if (M > 0) then
        AddString(SL, M, ' Minutes and ');
        AddString(SL, S, ' Seconds ');
        Status('Sleeping: ' + SL);
        Disguise('Sleeping: ' + SL);
      end;
    end;

    begin
      TakeBreak(60000);
    end.

  3. #3
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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
  •