Results 1 to 8 of 8

Thread: FindObjTPA problem

  1. #1
    Join Date
    Jan 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindObjTPA problem

    I have having a problem with funtion, not sure what the problem is.

    Code:
    Function Ladder:Boolean;
    var
    x, y:Integer;
    
    begin
      if FindObjTPA(x, y, 3886429, 10, 10, 12, 12, 400, ('Climb')) then
      begin
        MoveMouse(x, y);
        Wait(1000);
        ClickMouse(x, y, 1);
      end;
    end;
    I keep getting a type mismatch on the FindObjTPA line

  2. #2
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by mriddler View Post
    I have having a problem with funtion, not sure what the problem is.

    Code:
    Function Ladder:Boolean;
    var
    x, y:Integer;
    
    begin
      if FindObjTPA(x, y, 3886429, 10, 10, 12, 12, 400, ('Climb')) then
      begin
        MoveMouse(x, y);
        Wait(1000);
        ClickMouse(x, y, 1);
      end;
    end;
    I keep getting a type mismatch on the FindObjTPA line

    Simba Code:
    FindObjTPA(x, y, 3886429, 10, 10, 12, 12, 400, 'Climb')


    ~Home

  3. #3
    Join Date
    Jan 2012
    Location
    Minneapolis, Mn
    Posts
    185
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try this out.

    Simba Code:
    Function Ladder:Boolean;
    var
    x, y:Integer;

    begin
      if FindObjTPA(x, y, 3886429, 10, 10, 12, 12, 400, ['limb']) then
      begin
        MoveMouse(x, y);
        Wait(1000);
        ClickMouse(x, y, 1);
      end;
    end;

  4. #4
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Smile

    These are the arguments for the function FindObjTPA ...

    Simba Code:
    function FindObjTPA(var X, Y: Integer; Color, Tol, CTS, ObjWidth, ObjHeight, minCount: Integer; UpText: TStringArray): Boolean;

    Here is your line of this code ...

    Simba Code:
    if FindObjTPA(x, y, 3886429, 10, 10, 12, 12, 400, ('Climb')) then

    Change ('Climb') to ['Climb'].

    Also, just out of curiosity - you have CTS set to 10. I thought that the highest CTS could be was 3. Have I missed something perhaps?
    Ciao
    NM

  5. #5
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Nope, that's a bug. CTS 3 should do fine for this I think (I'm curious, as it sounds nice), default is CTS 1.
    I made a new script, check it out!.

  6. #6
    Join Date
    Jan 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I give up, clicking a simpl ladder, out of all the things i have done in my script, seems to be out of my reach.

  7. #7
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Seriously, don't give up - just give your mind a breather. Look at some tutorials, or read the posts under iSPY - anything. Just change tack for a while - then go back to it later.
    Ciao
    NM

  8. #8
    Join Date
    Jan 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I found a easier way to put the ladder in one spot, but i can't find a responding color to move into that specific spot, but the only problem is making sure that color is off screen so it will click the ladder instead of continuously clicking that spot instead of the ladder.

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
  •