Haven't made any RS3 scripts but firstly to make it check for both items with only 1 mouse over iteration
Simba Code:
if isMouseOverText(['Raw shrimp'],500) then
begin
shrimpSlot := S;
writeLn('There is raw shrimp in slot: ' + intToStr(S) + ' saving slot number for BurnAndCook');
foundShrimp := True;
mousecircle(747,540,5, MOUSE_LEFT);
break;
end else
if isMouseOverText(['Raw anchovies'],500) then
begin
shrimpSlot := S;
writeLn('There is raw anchovies in slot: ' + intToStr(S) + ' saving slot number for BurnAndCook');
foundShrimp := True;
mousecircle(747,540,5, MOUSE_LEFT);
break;
end;
Now secondly, again I'm not familiar with RS3 interfaces or even what they look like now, but surely you can create a DTM of each fish and then look for those in the inventory? I'm positive an include function will exist just for this. It'll return each slot a DTM is found. If not, here is one I use for OSRS, but the logic is the same.
Simba Code:
if FindDTMs(shrimpDTM, shrimpPoints, MIX1,MIY1,MIX2,MIY2) then //look for our shrimpdtm in the inventory
begin //fill shrimpPoints with found dtms point
for i := 0 to High(shrimpPoints) do //loop through each point
shrimpSlots := shrimpSlots +pntToItem(shrimpPoints[i]); //add the slot this point correlates to into shrimpSlots
ClearSameIntegers(shrimpSlots); //make sure any matched slots only occur once.
end;