You can much better use bitmaps/DTM's to find stuff in your inventory.
Here is an example of a part of my procedure that drinks a summoning flask:
Simba Code:
procedure RenewFamiliar;
var
Flask, SumTab, X, Y: Integer;
begin
if TimeFromMark(n)>300000 then
begin;
if FindColor(X, Y, 127, 0, 338, 518, 479) then
begin
ResetTime;
WriteLn('Renewing familiar');
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Inventory tab')
end else
begin
MouseBox(642, 168, 671, 204, 1); //FTab(tab_Inv);
WriteLn('Inventory tab');
Wait(100 + Random(100));
end;
Flask := DTMFromString('mAAEAAHic42FgYHBiYmBwBmJrKLYEYhsgdgRidyD2BmIfKA3iPwPquQHEt4H4ARC/AOIPQPwJit8C8ROo3B0glj12BkgyEY3/A0lGGmJkAAAVShDj');
if FindDTM(Flask, X, Y, MIX1, MIY1, MIX2, MIY2) then
MMouse(X, Y, 5, 5);
case Random(6) of
0..3: Mouse(X, Y, 0, 0, 1);
4..5: begin;
Mouse(X, Y, 0, 0, 0);
WaitOptionMulti(['Dri', 'ink'], 150);
end;
end;
FreeDTM(Flask);
WriteLn('Renewed summoning points');
Wait(100 + Random(300));
DTM Guide: http://villavu.com/forum/showthread.php?t=77691
Bitmap guide: http://villavu.com/forum/showthread.php?t=47374
This way you won't have to use UpText