Hello,
The follow code takes multiple words and multiple colors to search in the chatbox.
It will search all words in all colors.
Simba Code:
(*
IsChatBoxTextAnyLineMulti
~~~~~~~~~~~~~~~~~~~~
.. code-block:: pascal
function IsChatBoxTextAnyLineMulti(Text: TStringArray; Colors: TIntegerArray): Boolean;
Just like IsChatBoxTextAnyLine, only takes an array of text to search and an array of colors.
Each text is searched in each color
Example:
.. code-block:: pascal
if ( IsChatBoxTextAnyLineMulti( ['bot', 'other'], [16711680, 239]) ) then
*)
function IsChatBoxTextAnyLineMulti(Text: TStringArray; Colors: TIntegerArray): Boolean;
var
i, j, tCounter, cCounter: Integer;
begin
tCounter := High(Text);
cCounter := High(Colors);
for i := 0 to tCounter do
for j := 0 to cCounter do
if ( IsChatBoxTextAnyLine(Text[i], Colors[j]) ) then
begin
Result := True;
Exit;
end;
end;