Results 1 to 7 of 7

Thread: Help with some timing problems :S

  1. #1
    Join Date
    Dec 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Help with some timing problems :S

    I'm trying to make a Tip Sender i really don't know why this isn't working please help me it keeps spamming the the Text1
    Need some quick help please

    Simba Code:
    repeat
      MarkTime(TipTime);
        repeat
        if (TimeFromMark(TipTime) >= 2000) then
        begin
        TypeSendCustom(Text1);
        Exit;
        end;
        if (TimeFromMark(TipTime) >= 4000) then
        begin
        TypeSendCustom(Text2);
        wait(1000)

        end;
        if (TimeFromMark(TipTime) >= 6000) then
        begin
        TypeSendCustom(Text3);
        wait(1000)

        end;
        if (TimeFromMark(TipTime) >= 8000) then
        begin
        TypeSendCustom(Text4);
        wait(1000)
        Exit;
        end;
        if (TimeFromMark(TipTime) >= 10000) then
        begin
        TypeSendCustom(Text5);
        wait(1000)
        Exit;
        end;
      until(TimeFromMark(TipTime) >= 10500)
    until(false)
    Last edited by tocxic1; 03-15-2014 at 11:25 PM.

  2. #2
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    You wait 15 seconds, and after that time, your loop is broken because TimeFromMark(TipTime) is greater then 10.5 seconds.
    There used to be something meaningful here.

  3. #3
    Join Date
    Dec 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    i mean i added that wait just to test if i can make it type once any other problem?

  4. #4
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Remove the exits.
    There used to be something meaningful here.

  5. #5
    Join Date
    Dec 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Removed exits and wait isn't working .-.

    repeat
    MarkTime(TipTime);
    repeat
    if (TimeFromMark(TipTime) >= 480000) then
    begin
    TypeSendCustom(Text1);
    end;
    if (TimeFromMark(TipTime) >= 540000) then
    begin
    TypeSendCustom(Text2);
    end;
    if (TimeFromMark(TipTime) >= 800000) then
    begin
    TypeSendCustom(Text3);
    end;
    if (TimeFromMark(TipTime) >= 1200000) then
    begin
    TypeSendCustom(Text4);
    end;
    if (TimeFromMark(TipTime) >= 1500000) then
    begin
    TypeSendCustom(Text5);
    end;
    until(TimeFromMark(TipTime) >= 1500010)
    until(false)

  6. #6
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Actually nvm, read it wrong.

  7. #7
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Simba Code:
    program new;
    {$I SRL-OSR/SRL.Simba}

    const
      Text1 = 'Text1';
      Text2 = 'Text2';
      Text3 = 'Text3';
      Text4 = 'Text4';
      Text5 = 'Text5';

    var
      TipTime: Integer;

    begin
      repeat
        MarkTime(TipTime);
        repeat
          if (TimeFromMark(TipTime) >= 1000) then
          begin
            Writeln(Text1);
            Wait(1000);
          end;
          if (TimeFromMark(TipTime) >= 2000) then
          begin
            Writeln(Text2);
            Wait(1000);
          end;
          if (TimeFromMark(TipTime) >= 3000) then
          begin
            Writeln(Text3);
            Wait(1000);
          end;
          if (TimeFromMark(TipTime) >= 4000) then
          begin
            Writeln(Text4);
            Wait(1000);
          end;
          if (TimeFromMark(TipTime) >= 5000) then
          begin
            Writeln(Text5);
            Wait(1000);
          end;
        until(TimeFromMark(TipTime) >= 6000);
      until(False);
    end.
    There used to be something meaningful here.

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
  •