Results 1 to 4 of 4

Thread: hmm. odd bug

  1. #1
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default hmm. odd bug

    it has not problem at all finding the grey color, but when it moves the mouse over to click, it goes to the top right corner and terminates the script with no errors in the debug box.

    SCAR Code:
    function FindColHue(var a, b: integer; color: longint; x, y, cx1, cy1, cx2, cy2, tol: integer; hue, sat: extended): boolean;
    var
      CTS, I: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(hue, sat);
      FindColorsSpiralTolerance(x, y, TPA, color, cx1, cy1, cx2, cy2, tol);
      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 15, 15);
      For I := 0 to High(ATPA) do
      begin
        MiddleTPAEx(ATPA[i], x, y);
        Result := True;
        mmouse(x, y, 5, 5);
        getmousepos(x, y);
        Break;
      end;
    end;

    im thinking its more of this procedure, but heres the proc that its used in

    SCAR Code:
    procedure gotocenter;
    var x, y: integer;
    center: boolean;
    begin
      wait(2000 + random(1000));
      center:= FindColHue(x, y, 8553100, MMCX, MMCY, MMX1, MMY1, MMX2, MMY2, 20, 1.66, 0.03);
      if center then
      begin
        mouse(x, y, 5, 5, true);
        flag;
      end else messup('Cannot find the center');
    end;
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    scar Code:
    MiddleTPAEx(ATPA[i], x, y);
        Result := True;
        mmouse(x, y, 5, 5);
        getmousepos(x, y);
    To:
    scar Code:
    MiddleTPAEx(ATPA[i], a, b);
        Result := True;
        mmouse(a, b, 5, 5);
        getmousepos(a, b);


  3. #3
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  4. #4
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    one sec, SMART is being stupid atm.

    although im pretty sure its right now, thanks
    i forgot that x, y where parameters for the function
    Last edited by Awkwardsaw; 07-06-2009 at 03:52 AM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

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
  •