Results 1 to 4 of 4

Thread: Move mouse only if 2 colors found?

  1. #1
    Join Date
    Jan 2013
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default Move mouse only if 2 colors found?

    How would I got about doing this? For example I'm using Aerolibs TMSObject to find an object containing 2 colors, but I don't know how to move a mouse only if both are found... the way I have it now it moves to either the first or second color. I'm trying to find a certain object between a bunch of other objects with similar colors. Any help would be greatly appreciated.

    Code:
    procedure funWithObjs();
    var
      obj_Chest : TMSObject;
      Pnts      : TPointArray;
    begin                                                          // Wooden color                     // Silver color
      obj_Chest.create('Chest', ['Open Bank chest','Bank chest'], [createCol(7373972, 5, 0.10, 0.96)], [createCol(3956855, 5, 0.19, 1.07)]);
      if obj_Chest.findAll(10, MSCP, Pnts) then
      begin
        writeln('Found a possible '+toStr(length(Pnts))+ 'chests');
        HumanMMouse(Pnts[1], 5, 5);
      end;
    end;
    Sorry if this is a stupid question, it's got me stumped.

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    idk if the current srl6 already have a function defined for that but you can just call
    Code:
    SetToleranceSpeed2Modifers(0.10, 0.96);
    FindColorsTolerance(tpa1, 7373972, ...);
    SetToleranceSpeed2Modifers(0.19, 1.07);
    FindColorsTolerance(tpa2, 3956855, ...);
    if length(tpa1) > someLength and length(tpa2) > someLength then //change someLength to some integer
       writeln('both colors found');
    Check the docs for complete parameters of FindColorsTolerance.

  3. #3
    Join Date
    Oct 2012
    Posts
    1,258
    Mentioned
    40 Post(s)
    Quoted
    588 Post(s)

    Default

    https://villavu.com/forum/showthread.php?t=58935 ctrl + f "Programming Statements"

  4. #4
    Join Date
    Jan 2013
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    I know how to find both colors, I just don't know how to make the mouse move to the object that has both the colors instead of moving to just one of them. :c


    EDIT: Think I got it figured out with clustertpa
    Last edited by deejaay; 12-18-2016 at 04:23 PM.

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
  •