Results 1 to 3 of 3

Thread: Find Color Function

  1. #1
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Find Color Function

    When I use any FindColor or FindColorTolerance I get a variable expected in script line x:y which is the spot after C in FindColor and after the a in FindColorTolerance. I used all numbers with an if then statement.

    Here's what it is...

    Code:
    Procedure Blah;
    begin
        if (FindColor(26, 12, 8639680, 12, 4, 45, 25)) then
        begin
               Mouse(26, 12, 1, 1, True);
        end;
    end;
    any suggestions would help...

    Its suppose to find the start in the top left on vista...

    and click on it...

  2. #2
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by death12652 View Post
    When I use any FindColor or FindColorTolerance I get a variable expected in script line x:y which is the spot after C in FindColor and after the a in FindColorTolerance. I used all numbers with an if then statement.

    Here's what it is...

    Code:
    Procedure Blah;
    begin
        if (FindColor(26, 12, 8639680, 12, 4, 45, 25)) then
        begin
               Mouse(26, 12, 1, 1, True);
        end;
    end;
    any suggestions would help...

    Its suppose to find the start in the top left on vista...

    and click on it...
    Code:
    procedure Blah;
    var
      x, y: integer;
    begin
        if (FindColor(x, y, 8639680, 12, 4, 45, 25)) then
        begin
               Mouse(x, y, 1, 1, True);
        end;
    end;

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  3. #3
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    SCAR Code:
    Procedure Blah;
    var
      x, y: integer;
    begin
        if (FindColor(x, y, 8639680, 12, 4, 45, 25)) then
        begin
               Mouse(x, y, 1, 1, True);
        end;
    end;

    That's what you need. FindColor finds the color and stores the coords to x, y.

    edit: ninjaed.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

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
  •