I had an issue, ended up resolving it myself. I'll explain it here because I'm sure others will have the same problems I did.
Easyuo has the feature when you find an item type, it returns an array that you can loop through. Something like this ...
finditem DWJ c_ , #backpackid
for #findindex 1 #findcnt
{
... do stuff with each item, whether you found 1 or 1000, accessing items using #finditem ...
}
It was a challenge figuring out how to achieve the same functionality in Stealth. Most of the find functions (except FindType) lump all the items you find that are similar into one item count. If you're looking to loop through a series of items you find that are similar, here's a little minimal application I wrote that simply loops through all the large-sized ore at your feet, double clicking them.
Program New;
const
Ore=$19B9;
procedure doubleclickore;
var
b : Integer;
i : Integer;
List: TStringList;
begin
FindDistance := 3;
FindType(Ore,Ground);
if(FindCount > 0) then
begin
List := TStringList.Create();
GetFindedList(List);
for i := 0 to List.Count -1 do
begin
b := StrToInt('$'+List.Strings[i]);
UseObject(b);
wait(2000);
end;
end;
end;
Begin
doubleclickore;
End.