mainscreen.findObject(var ix, iy: integer; col, tol: integer; colSettings: TColorSettings; sortFrom: TPoint; objWidth, objHeight, minCount: integer; mouseOverText: TStringArray; mouseAction: integer = MOUSE_LEFT)
ix, iy: The coordinates of the object if found (note this is an output variable).
col: The color to be found - this is the color from ACA.
tol: The tolerance of the color - this is the HSL Tol from ACA.
colSettings: The color settings are presented in parentheses (CTS, hue, sat) - these are from ACA.
sortFrom: The TPoint where you want it to sort the array from (don't worry too much about this now - I explain this in my TPA/ATPA sub-tutorial below).
objWidth: The width (in pixels) of the object you're trying to find.
objHeight: The height (in pixels) of the object you're trying to find.
minCount: The minimum number of pixel that must match your color on a single object.
mouseOverText: The mouseOverText of the object.
mouseAction: The action of the mouse. Default is MOUSE_LEFT, but you could also have MOUSE_RIGHT, MOUSE_MOVE.
To find the deposit box I'm going to use this:
mainscreen.findObject(x, y, 5270142, 5, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['eposit', 'box'], MOUSE_LEFT)
I am searching for the color 5270142
with a tolerance of 5
I'm using CTS2 with a hue of 0.07 and sat of 0.15
I'm sorting the matching TPoints from my player
My object has a width of about 30 pixels
My object has a height of about 50 pixels
I want it to find at least 50 matching pixels
The mouseOverText is 'eposit' or 'box'
I'm left clicking the mouse (I could leave this blank as MOUSE_LEFT is actually default)