Results 1 to 6 of 6

Thread: Click Count?

  1. #1
    Join Date
    May 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Click Count?

    For a failsafe, I'm trying to find a way so that it will read how many clicks it has performed before giving up on the inventory and continuing to the banking. I've been looking around the functionlist for a while now and have just brainfarted, here's my idea:
    Code:
    var
      ClickCount:Integer;
    
    Begin
      ClickCount := 0;              <-- Resets the clickcount to 0 for every loop
      repeat
        TypeSend('1', False);
          Wait(randomRange(50, 150));
        fastclick(MOUSE_LEFT);
          Wait(randomRange(1500, 350));
      until
        (isMouseOverText(['une bar']));
      or
        ClickCount >= 6;           <-- Limits the amount of clicks since the beginning of the procedure
    End;
    TLDR, Can I count Clicks?
    Any help/advice would be amazing

  2. #2
    Join Date
    Mar 2013
    Location
    Freedomville.
    Posts
    155
    Mentioned
    2 Post(s)
    Quoted
    107 Post(s)

    Default

    You are looking for
    Simba Code:
    inc(ClickCount)

    i.e.
    Simba Code:
    var
      ClickCount: Integer;
    begin
      ClickCount := 0;
      repeat
        TypeSend('1', False);
        Wait(randomRange(50, 150));
        fastclick(MOUSE_LEFT);
        inc(ClickCount);
        Wait(randomRange(1500, 350));
      until (isMouseOverText(['une bar']));
      or ClickCount >= 6;
    end;

  3. #3
    Join Date
    May 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by sdf View Post
    You are looking for
    Simba Code:
    inc(ClickCount)

    i.e.
    Simba Code:
    var
      ClickCount: Integer;
    begin
      ClickCount := 0;
      repeat
        TypeSend('1', False);
        Wait(randomRange(50, 150));
        fastclick(MOUSE_LEFT);
        inc(ClickCount);
        Wait(randomRange(1500, 350));
      until (isMouseOverText(['une bar']));
      or ClickCount >= 6;
    end;
    Facepalm, Thank you

  4. #4
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Simba Code:
    var
      ClickCount: Integer;
    begin
      ClickCount := 0;
      repeat
        TypeSend('1', False);
        Wait(randomRange(50, 150));
        fastclick(MOUSE_LEFT);
        //inc(ClickCount);   /// or below.
        ClickCount := ClickCount + 1;
        Wait(randomRange(1500, 350));
      until isMouseOverText(['une bar']) or (ClickCount >= 6);
    end;
    changed the end to that until statement to correct syntax/standards. did it work like that before?

  5. #5
    Join Date
    May 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    Simba Code:
    var
      ClickCount: Integer;
    begin
      ClickCount := 0;
      repeat
        TypeSend('1', False);
        Wait(randomRange(50, 150));
        fastclick(MOUSE_LEFT);
        //inc(ClickCount);   /// or below.
        ClickCount := ClickCount + 1;
        Wait(randomRange(1500, 350));
      until isMouseOverText(['une bar']) or (ClickCount >= 6);
    end;
    changed the end to that until statement to correct syntax/standards. did it work like that before?
    It actually did, but thanks for going back and double checking

  6. #6
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    You could also use:

    Simba Code:
    procedure something();
    var
      clickCount: integer;
    begin
      while clickCount < 7 do
      begin
        typeSend('1', False);
        wait(randomRange(50, 150));
        fastclick(MOUSE_LEFT);
        wait(randomRange(1500, 350));
        if isMouseOverText(['une bar'])) then
          break;
      end;
    end;

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
  •