Abu
2013-12-06 13:06:59
This is the piece of code which according to my logic should theoretically work, and did work for me on srl 5 (bout a year ago):
SMART Debug draws a circle around the exact point where I want to click, lovely jubbly. However, here is where my problem lies, when the mouse function is called it moves to a completely random ass location like in theminimap or top-left corner of the screen. Why is this?
Debug shows my TPA is where I want it to be, so why will my mouse not move to the middle of my TPA? Why does it wonder off to some wayward location?
Also, just to confirm, is isMouseOverText() the replacement function for isUptext, or am I calling the completely wrong function here.
Oh and whatever happened to MSX1, MSY1 etc.. I've replaced them with mainScreen.getBounds(), am I correct in doing so? I've also replaced MIX1, MIY1 etc.. with gameTabs.getArea(), is that correct?
A lot of questions I know but I'm still trying to get familiar with srl 6.
Cheers.
Arr := findTPACluster([3426430, 2899564, 2129051], 25, mainScreen.getCenterPoint(), -1, -1, 1, 12, True, mainscreen.getBounds());
for a := 0 to high(Arr) do
begin
smartImage.drawCircle(MiddleTPA(Arr[a]), 10, False, clred);
x := middleTPA(Arr[a]).x;
y := middleTPA(Arr[a]).y;
mouse(point(p.x, p.y), MOUSE_RIGHT, MOUSE_ACCURATE);
if isMouseOverText(['ron'], 3000) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['ron'], 3000);
result := True;
break;
end else
begin
writeLn('Error finding uptext, exiting function');
result := False;
exit;
end; SMART Debug draws a circle around the exact point where I want to click, lovely jubbly. However, here is where my problem lies, when the mouse function is called it moves to a completely random ass location like in the
Debug shows my TPA is where I want it to be, so why will my mouse not move to the middle of my TPA? Why does it wonder off to some wayward location?
Also, just to confirm, is isMouseOverText() the replacement function for isUptext, or am I calling the completely wrong function here.
Oh and whatever happened to MSX1, MSY1 etc.. I've replaced them with mainScreen.getBounds(), am I correct in doing so? I've also replaced MIX1, MIY1 etc.. with gameTabs.getArea(), is that correct?
A lot of questions I know but I'm still trying to get familiar with srl 6.
Cheers.