Asha had it right with the exception that, as I mentioned previousley, you can only have a string uptext.
For example, a string, is:
Simba Code:
var
s : string;
begin
s := 'dragon flying purple eater';
writeln(s);
end.
whereas a TStringArray (the parameter that is
not accepted as UpText for this function call) is:
Simba Code:
var
sArr : TStringArray;
begin
sArr := ['hi', 'how', 'are', 'you'];
writeln(sArr);
end.
In the above examples, a sArr is a TStringArray, or an array of string type.
This is different from having a single string, s.
THUS!
When making the Banking procedure (for your original query), we can go about many ways, but two interesting ideas in particular:
1.
Use a single string to match upText
Simba Code:
procedure Banking;
var
DPick : Integer;
begin
DPick := DTMFromString('mbQAAAHicY2VgYMhmYmBIB+IaIE4E4iIgFmdkYOAAYkkgVgNiHiBmYGDCgjEBIxYMBgD4aAKv');
OpenBankQuiet('eb');
DepositAll;
WithdrawItem(DPick, 'dtm', 1, 'Dragon pickaxe', []);
FreeDTM(DPick);
end;
2.
(loop through an array of string (aka a TStringArray)
Simba Code:
procedure Banking;
var
DPick, i : Integer;
UpTexts : TStringArray;
begin
DPick := DTMFromString('mbQAAAHicY2VgYMhmYmBIB+IaIE4E4iIgFmdkYOAAYkkgVgNiHiBmYGDCgjEBIxYMBgD4aAKv');
OpenBankQuiet('eb');
DepositAll;
UpTexts := ['rag', 'ick', 'ragon', 'ickaxe', 'Dragon pickaxe'];
for i := 0 to high(UpTexts) do
if WithDrawItem(DPick, 'dtm', 1, UpTexts[i], []) then
break;
FreeDTM(DPick);
end;
Explanation:
In the first snippet, you look for the exact match, of a single string, s.
In the second snippet, you iterate through your array of string (multiple), or TStringArray, calling WithdrawItem with a new string value (indicated by the current index being iterated through within the for loop), testing it for that uptext.
In my opinion, I'd recommend either creating your own custom function based off of the second example, working in a TStringArray argument parameter. This could be implemented very similar to how the current withdrawItemEx function works, given the exception you change the internal line inside WithdrawItemEx (because WithDrawItem calls this), from
if WaitUpText(UpText, 300) then to use the function,
WaitUpTextMulti(S: TStringArray; Time: Integer).
Nonetheless, the original snippet I shared will still obtain the outcome you desired.
Cheers,
Lj