Long time since I've made one -
SCAR Code:
Function music_SwitchTrack: Boolean;
Var
TPAA: T2DPointArray;
TPA: TPointArray;
i, l, z: Integer;
TB: TBox;
Begin
GameTab(13);
For I := 0 To 6 Do
If FindColor(X, Y, 65280, 554, 268, 713, 445) Then
Break
Else
MouseBox(715, 284, 729, 436, 1);
If FindColor(X, Y, 65280, 554, 268, 713, 445) Then
Begin
FindColorsTolerance(TPA, 65280, 554, 268, 713, 445, 0);
TPAA := TPAToATPAEx(TPA, 150, 11);
L := GetArrayLength(TPAA);
For I := 0 To Random(L - 1) Do
Swap(TPAA[Random(L)], TPAA[Random(L)]);
I := 0;
While (Not Result) And (i < L) Do
Begin
z := Random(L);
If GetArrayLength(TPAA[i]) > 10 Then
Begin
TB := GetTPABounds(TPAA[i]);
MouseBox(TB.x1, TB.y1, TB.x2, TB.y2, 1);
Result := True;
Break;
End;
I := I + 1;
End;
End;
End;