Grimtoker
2011-12-21 15:21:36
I'm looking for help relating to a FindObject issue, the current method I'm using at the moment is working, however it is not 100% accurate and sometimes may fail to find/click the object.
It needs to click a very small area, very accurately. It's a rope in the Gnome Agility Course. I'm wondering if there is a better way to find/click it, maybe through DTM's or something?? I don't know, excuse me, i'm still learning. Any help here would be greatly appreciated and help me learn more :)
Below is a picture of the rope I need to click and also the code I'm using for the procedure.

It needs to click a very small area, very accurately. It's a rope in the Gnome Agility Course. I'm wondering if there is a better way to find/click it, maybe through DTM's or something?? I don't know, excuse me, i'm still learning. Any help here would be greatly appreciated and help me learn more :)
Below is a picture of the rope I need to click and also the code I'm using for the procedure.

Procedure Rope;
Var
x, y, LoopBegin:Integer;
ClickRed : Boolean;
Begin
MarkTime(LoopBegin);
Repeat
FindObjEx(x, y, ['alancing', 'ope'], [5140363, 5931426, 4547452], 5, 40, 427, 163, 445, 191)
GetMousePos(x, y);
MMouse(x, y, 1, 1);
until IsUpText('ope')
begin
repeat
IsUpText('ope');
Mouse(x, y, 1, 1, False);
WaitOption('ope', 1000);
ClickRed := DidRedClick;
Wait(1000+Random(100));
until ((TimeFromMark(LoopBegin) > 20000) or ClickRed);
End;
End;