Results 1 to 5 of 5

Thread: Finding a color and clicking it

  1. #1
    Join Date
    Aug 2007
    Location
    The cardboard box down the street
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Finding a color and clicking it

    SCAR Code:
    program MyScript;
    var
    x, y: Integer;
    begin
      repeat
        if(FindColorTolerance(x, y, 10079487, 1, 1, 350, 320, 25))then
        begin
          MoveMouse(x, y);
          ClickMouse(x, y, True);
        end;
      until(False)
    end.

    Hmm this seems correct, but all it does it click in random places. And, Yes the colors are correct. What is wrong?

  2. #2
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Maybe you should try lowering the tolerance?
    25 is pretty high when finding a very precise color.

    Maybe use MMouse and Mouse rather than MoveMouse and ClickMouse;
    it makes it more human-like rather than the mouse just randomly appearing at the coords. (of course then you'd have to include SRL into your script)
    SCAR Code:
    {.include srl/srl.scar}

    Not sure. Hope this helps. Just play around with it a lil'
    Derek-

  3. #3
    Join Date
    Aug 2007
    Location
    The cardboard box down the street
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What should I change the 25 to? I changed it to 1 and it did the same thing.

  4. #4
    Join Date
    Jun 2007
    Location
    Belgium
    Posts
    333
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Mostly i use a tolerance of 5, but then again, it all depends on what your trying to find. The movemouse, clickmouse thing replace it with Mouse(x, y, 0, 0, True); Does the same and it's alot less detectable.

    Next time you try your colorfinding, get the color again, and use it with a tolerance of 0, then use the colorpicker in scar, to check if it found the right color, atleast then you know it's not your scar that's faulty.

    My guess is that you'll need to find a more specific color or put in an extra check to filter out the compatible colors, like checking for uptext if possible.

  5. #5
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    program MyScript;
    {.include SRL/SRL.scar}
    var
    x, y: Integer;
    begin
      repeat                                                    //should be 5-10 :), tolerance i mean.
        if(FindColorTolerance(x, y, 10079487, 1, 1, 350, 320, 5))then
        begin
          MMouse(x, y, 3, 3);  //these should work better(MMouse,Mouse), they are more humanlike.
          Mouse(x, y, 3, 3, True);  //true if left click, false if right click.
        end;
      until(False)
    end.
    Eerik.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto Color Clicking?
    By groog in forum OSR Help
    Replies: 5
    Last Post: 08-01-2008, 04:12 AM
  2. i need help with color clicking
    By ummmmm0k in forum OSR Help
    Replies: 2
    Last Post: 02-01-2008, 01:02 AM
  3. Need help finding & clicking color
    By Jacobdm0 in forum OSR Help
    Replies: 6
    Last Post: 08-16-2007, 02:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •