Seems a bit like you're trying to re-invent the wheel here...
I have just copied the SRL Withdraw() function, and taken out the tab-fixing.
SCAR Code:
program New;
{.include SRL/SRL.scar}
const
Bank = 'db';
procedure WithdrawX(col, row, Amount: Integer);
Var
BBox: TBox;
begin
//FixBank;
//FixBankTab;
BBox := BankIndexToMSBox(BankPointToBankIndex(Point(Col - 1, Row - 1)));
If Amount = 1 Then
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 1);
Wait(RandomRange(50, 150));
End
Else
Begin
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
if (Amount = 5) or (Amount = 10) then
ChooseOption('Withdraw-' +IntToStr(Amount))
else if Amount = 0 then
ChooseOption('Withdraw-All')
else
if (ChooseOption('Withdraw-X')) then
begin
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount));
end;
End;
end;
function InBank(Item:String; Amount:Integer):Boolean;
begin
if not OpenBankQuiet(Bank) then
Exit;
DepositAll //empties inv to refill later in this function
SearchBank(Item) //uses search function in bank
wait(1000);
WithdrawX(1,1,Amount);
CloseBank;
end;
begin
SetUpSRL;
InBank('feather', 2);
end.
P.S. Don't double post :P