Results 1 to 9 of 9

Thread: FindColorsTolerance function?

  1. #1
    Join Date
    Nov 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindColorsTolerance function?

    I've searched but I can't seem to find any documentation on this FindColorsTolerance function, but I keep seeing it used in scripts. Could someone explain it to me?

    Also, what's the difference between a "procedure" and a function?

  2. #2
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FindColorsTolerance returns the position of every color found within a tolerance in a TPoint Array

    The difference between a procedure and a function is that a function returns a value. i.e.

    SCAR Code:
    x := aFunction;
      x := aProcedure; //this line would not work
    ~ Metagen

  3. #3
    Join Date
    Nov 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Metagen View Post
    FindColorsTolerance returns the position of every color found within a tolerance in a TPoint Array

    The difference between a procedure and a function is that a function returns a value. i.e.

    SCAR Code:
    x := aFunction;
      x := aProcedure; //this line would not work
    What's the syntax of FindColorsTolerance?

  4. #4
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FindColorTolerance searches the selected client for the color you selected, with a slight tolerance of colors like it.

    Example
    SCAR Code:
    FindColorTolerance(x, y, 1679555, MSX1, MSY1, MSX2, MSY2, 5)
    Function - coordinates - color - edges of screen - tolerance

    This would look for the pinkish color of a raw chicken in the selected screen.

    And the difference between a procedure and a function is this:

    -A function is a piece of code which does an action / search and returns a value (Like FindColorTolerance)

    -A procedure is a piece of code in your script, where you put a couple of functions after each other to do a number of actions.
    Like if the function FindColorTolerance finds the color it is looking for, then click it.

    Hope i helped

    ~SirPali

  5. #5
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Note the difference between
    FindColorsTolerance
    FindColorTolerance
    ~ Metagen

  6. #6
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Metagen View Post
    Note the difference between
    FindColorsTolerance
    FindColorTolerance
    Ah, missed the s

    Nvm my comment

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by meese View Post
    What's the syntax of FindColorsTolerance?
    Open SCAR. Hit F1. It is there.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  8. #8
    Join Date
    Nov 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    Open SCAR. Hit F1. It is there.
    Duh. Thanks.

  9. #9
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you use if then for functions because they would return true/false or another type of variable for example a function in srl.
    if not(LoggedIn) then Exit;


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 02-27-2008, 05:20 PM
  2. Replies: 2
    Last Post: 02-26-2008, 08:26 PM
  3. [FUNCTION] FindDoorColour: integer; By ZephyrsFury [FUNCTION]
    By ZephyrsFury in forum Research & Development Lounge
    Replies: 10
    Last Post: 07-27-2007, 08:45 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
  •