SRL Archive - Help

Really weird error when trying to use MouseBox.


KeepBotting

2012-08-30 20:07:36

** Warning in GaussBox: Point invalid (323, 552) **

The point changes every time I run my script.
The point isn't invalid. I've checked four times.

KeepBotting

2012-08-30 20:33:53

Help?

print

2012-08-30 20:35:04

try doing // at the line that usually works for me ha

Le Jingle

2012-08-30 20:39:08

Make sure (x1, y1) values are lower integers compared to (x2, y2);
Also, how are you using the aforementioned 'error' code? More would help (i.e. if it's being passed wrong parameters with a function/procedure from the include

KeepBotting

2012-08-30 20:40:31

From: print123
try doing // at the line that usually works for me ha
But I need the line.

From: Le Jingle
Make sure (x1, y1) values are lower integers compared to (x2, y2);
They are.

Runaway

2012-08-30 21:12:00

Could you post the line / relevant lines?

KeepBotting

2012-08-30 21:29:52

From: Runaway
Could you post the line / relevant lines?
Oh, sorry. Never mind. Fixed it lmao.

t4q

2013-04-08 08:34:29

From: KeepBotting
Oh, sorry. Never mind. Fixed it lmao.

How did you fix it, Iam facing the same problem?

Ian

2013-04-08 08:49:06

From: t4q
How did you fix it, Iam facing the same problem?


Post the relevant code please :)

t4q

2013-04-08 10:42:00

 SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.23);
if findcolorsspiraltolerance(x, y, DoorTPA, 2184045, MSX1, MSY1, MSX2, MSY2, 5) then
begin
DoorATPA := SplitTPAEx(DoorTPA, 8, 8);
SortATPASize(DoorATPA, true);
for i := 0 to high(DoorATPA) do
begin
DoorBox := GetTPABounds(DoorATPA[i]);
SMART_DebugATPA(true, DoorATPA);
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
mousebox(DoorBox.x1 + 2, Doorbox.Y1 + 2, Doorbox.X2 - 2, Doorbox.Y2 - 2, mouse_move);

That's the code.. It started to work when i replaced last line with
mousebox(DoorBox.x1, Doorbox.Y1, Doorbox.X2, Doorbox.Y2, mouse_move);

Thing is I don't understand why I got that error beause door was big enough to use those +2's and -2's

Ian

2013-04-08 10:48:42

From: t4q
 SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.23);
if findcolorsspiraltolerance(x, y, DoorTPA, 2184045, MSX1, MSY1, MSX2, MSY2, 5) then
begin
DoorATPA := SplitTPAEx(DoorTPA, 8, 8);
SortATPASize(DoorATPA, true);
for i := 0 to high(DoorATPA) do
begin
DoorBox := GetTPABounds(DoorATPA[i]);
SMART_DebugATPA(true, DoorATPA);
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
mousebox(DoorBox.x1 + 2, Doorbox.Y1 + 2, Doorbox.X2 - 2, Doorbox.Y2 - 2, mouse_move);

That's the code.. It started to work when i replaced last line with
mousebox(DoorBox.x1, Doorbox.Y1, Doorbox.X2, Doorbox.Y2, mouse_move);

Thing is I don't understand why I got that error beause door was big enough to use those +2's and -2's


Try putting the math in the brackets like so:


MouseBox((DoorBox.x1 + 2), (Doorbox.Y1 + 2), (Doorbox.X2 - 2), (Doorbox.Y2 - 2), mouse_move);

t4q

2013-04-08 10:53:28

of corse lol, tnx