kodeejs
07-08-2007, 08:09 AM
Some functions doesn`t work! Like i think FindObj after update doesn work anymore, im thinking make my function which will find what i need in rs window. But why have thees errors, did that from updates? And how i see some other functions don`t work too like openbank etc. I look on other scripts and they have that errors too...
Santa_Clause
07-08-2007, 08:15 AM
Hmm...They work perfectly for me...?
DevilCheater
07-08-2007, 02:21 PM
Yea , For me too and i found out that reason is FindMSColorTol function
Try to do something like me for exemple
function FindObjMultiText(var cx, cy: Integer; Ut1, UT2, UT3: string; color, tolerance: Integer): Boolean;
var
x, y, a, c, i, x1, y1, x2, y2: Integer;
begin
if (FindMSColorTol(x, y, color, tolerance)) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (Loggedin)) then
Break;
a := a + 1;
if (a = 1) or (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end else
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end else
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end else
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(x, y, color, x1, y1, x2, y2, tolerance)) then
begin
MMouse(x, y, 0, 0)
cx := x;
cy := y;
if (IsUpTextMulti(UT1, UT2, UT3)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
This is the way it will work
function FindObjMultiText(var cx, cy: Integer; Ut1, UT2, UT3: string; color, tolerance: Integer): Boolean;
var
x, y, a, c, i, x1, y1, x2, y2: Integer;
begin
if (FindColorTolerance(x, y, color, mmx1, mmy1, mmx2, mmy2, Tolerance)) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (Loggedin)) then
Break;
a := a + 1;
if (a = 1) or (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end else
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end else
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end else
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(x, y, color, x1, y1, x2, y2, tolerance)) then
begin
MMouse(x, y, 0, 0)
cx := x;
cy := y;
if (IsUpTextMulti(UT1, UT2, UT3)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
Did not test it but it should work
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.