Any Idea why this bitmap isnt being clicked on?
Code:
program Cutter;
var
chop:Integer;
begin
chop := BitmapFromString(69, 6, 'meJytVEFygzAMzBcSwAYmOaRgS7I' +
'JvXX60fwlL8i7soTWVmkYDu2MhhFrIe2ihevtfr3dd7td5EbH dQXf' +
'DBbbn/euOwRvvC9dX4hYT4bOe5E6kBFXIlJ/cuUQGvZllJrJsNQkl' +
'ocGV+9K4BKbEJq+KwLZZ810FW8oNkNo0VPw+NAAQdka7RlPsX a0hj' +
'OYTLQr8RWmIEC7fzvE2OoyzA0gL/WPnmHi+fHJ8y0SZsvfVNEW0hb' +
'0oIi6gtlsysGRZp7ATZx9NW2nOzxFGdwiFj2n7Sgw4XRpx/GUcKyA' +
'1ZsXJT+Pw2bV0tfMpkcvTLiZB4YHqslOsaVQv+x5GY8pd5Jro song' +
'Yrq+H563epy3JTzlxxy5hC22tg6xyJyLjavgMzCUekIVsytKD/iXJ' +
'mm6+Tf5cyRafdFzjnzIZ/Njz/Ab0d9lalFM6nvZWgffM+now==');
end;
Procedure free
begin
FreeBitmap(chop)
end;
Procedure Cut;
var
X,Y,Mx,My:Integer;
Begin
if FindColorSpiralTolerance(X, Y, 874576, 8, 26, 520, 357, 2) or
FindColorSpiralTolerance(X, Y, 2189408, 8, 26, 520, 357, 2) or
FindColorSpiralTolerance(X, Y, 3170392, 8, 26, 520, 357, 2) or
FindColorSpiralTolerance(X, Y, 3172448, 8, 26, 520, 357, 2) or
FindColorSpiralTolerance(X, Y, 4419191, 8, 26, 520, 357, 2) or
FindColorSpiralTolerance(X, Y, 4617085, 8, 26, 520, 357, 2) or
FindColorSpiralTolerance(X, Y, 4683392, 8, 26, 520, 357, 2) then
begin
wait(200);
MoveMouse(X, Y);
wait(500);
ClickMouse(X, Y, mouse_Right);
wait(200);
if FindBitmap(chop, Mx,My) then
begin
wait(400);
MoveMouse(Mx,My);
wait(400);
ClickMouse(Mx,My, mouse_Left);
end;
end;
end;
Procedure Bank;
var
Mx,My,X,Y:Integer;
Begin
if FindColorTolerance(Mx, My, 6128266, 691, 456, 727, 482, 1) then
begin
FindColorTolerance(X, Y, 195836, 558, 42, 711, 180, 1);
wait(300);
MoveMouse(X, Y);
wait(500);
ClickMouse(X, Y, mouse_Left);
wait(2000);
FindColorTolerance(X, Y, 2835294, 315, 32, 518, 355, 1);
wait(300);
MoveMouse(X, Y);
wait(1000);
ClickMouse(X, Y, mouse_Left);
wait(1500);
end;
end;
Procedure deposit;
var
Mx,My,X,Y:Integer;
Begin
FindColorSpiralTolerance(Mx, My, 1985923, 129, 315, 147, 332, 4);
wait(300);
MoveMouse(Mx, My);
wait(500);
ClickMouse(Mx, My, mouse_Left);
wait(200);
begin
FindColorTolerance(X, Y, 1382428, 486, 43, 496, 53, 1);
wait(300);
MoveMouse(X, Y);
wait(500);
ClickMouse(X, Y, mouse_Left);
wait(1000);
end;
end;
begin
repeat
cut;
bank;
deposit;
addOnTerminate('free');
until(isKeyDown(13)=true)
end.
The script will right click the tree then the mouse moves to the origin.