SRL Archive - OSR Help

Small problem


mastah

2012-01-26 17:03:35

Hi,

ATM I have this code:

if (FindObjCustom(X, Y, ['example','example'], [90,90], 3)) then
Mouse(70, 70, 100, 100, True);

I want to make X,Y a constant how do I do this? I dont want simba to search the whole screen only a part of it. If that's possible.

Regards!

Kyle Undefined

2012-01-26 17:15:03

Using that function, the X/Y is returned at coords if that object is found. If you want to make a constant variable, you could do something like this:


var
cX, cY : Integer;

if(FindObjCustom(X, Y, ['example', 'example'], [90, 90], 3))then
begin
GetMousePos(cX, cY);
Mouse(cX, cY, 100, 100, mouse_Left);
end;