Results 1 to 6 of 6

Thread: mouse click + tpa error

  1. #1
    Join Date
    Dec 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default mouse click + tpa error

    hey all, i have been creating a auto that uses FindColorSpiral and TPAs. Like the first 20 times it tested the bot, it was working (it is not complete). but now, i am recieving a "out of range" error.

    here is an exerpt from my script:
    SCAR Code:
    begin
      FindColorsSpiralTolerance(86, 191, TPA, 2894895, 1, 1, 515, 337, 0);
      For I := 0 To Low(TPA) Do
       Begin
        Mouse(TPA[i].x, TPA[i].y, 1, 1, true);
        Wait(2000 + random(240));
       end;
    end;


    ok it says the error is in "Mouse(TPA[i].x, TPA[i].y, 1, 1, true);". i use this line about 4 times in my script. yesterday, it gave me the error on the first "Mouse(TPA[i].x, TPA[i].y, 1, 1, true);" in the script. today it gave me an error on the third "Mouse(TPA[i].x, TPA[i].y, 1, 1, true);" (the first one worked fine). does the comp just not like me n is tryin to be mean to me or is ther something wrong?

    also, if u guys have a better way of clicking plz share it.

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

    Default

    It's probably because it's not finding the color.
    You can try it like this to find out:
    SCAR Code:
    begin
      FindColorsSpiralTolerance(86, 191, TPA, 2894895, 1, 1, 515, 337, 0);
      try //if an error occurs..
        For I := 0 To Low(TPA) Do
         Begin
          Mouse(TPA[i].x, TPA[i].y, 1, 1, true);
          Wait(2000 + random(240));
         end;
      except //it will go here..
        if (GetArrayLength(TPA)=0) then WriteLn('Color not found.') else
          WriteLn('Array length is ' +IntToStr(GetArrayLength(TPA))+ '. Some other error occured.');
      end;
    end;

  3. #3
    Join Date
    Dec 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thx it helped still cant find color, so i will do a little tweeking thx

    o n is there a better mouse clicking function?

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

    Default

    No 'Mouse' is the best one

    But also just F.Y.I. it is really only going to click once.. As you have 'For I := 0 To Low(TPA) Do' and 'Low(TPA)' is always going to be zero.
    So it really will only be doing 'Mouse(TPA[0].x, TPA[0].y, 1, 1, true);'.

  5. #5
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    begin
      X := 86;
      Y := 191;
      FindColorsSpiralTolerance(X, Y, TPA, 2894895, 1, 1, 515, 337, 0);
      Mouse(TPA[0].x, TPA[0].y, 1, 1, true);
      Wait(2000 + random(240));
    end.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  6. #6
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    If you want to click all the points for the first point of the array to the last, do

    For I := 0 To High(TPA) Do

    and for last to first,

    For I := High(TPA) DownTo 0 Do


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Depositing And A Quick Mouse Click
    By D1zl3 in forum OSR Help
    Replies: 11
    Last Post: 12-01-2008, 04:58 AM
  2. Click the mouse without moving it?
    By orange in forum OSR Help
    Replies: 5
    Last Post: 08-08-2008, 10:13 PM
  3. Mouse doesn't click DTM
    By Richard in forum OSR Help
    Replies: 7
    Last Post: 02-10-2008, 10:07 PM

Posting Permissions

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