How do I interrupt a bank function, (OpenBankFast()), after a certain time amount goes by? Right now the script I have is:

SCAR Code:
MarkTime(time);
  if (not (Loggedin)) then exit;
  repeat
    OpenBankFast(BankName);
  until (BankScreen or (TimeFromMark(time) > 5000));
  if not BankScreen then
  begin
    Mouse(500, 600, 15, 15, True);
    wait(RandomRange(100, 150));


Which doesn't work, (meaning it attempts to open the bank for more than 5 seconds)...

-Macros

(btw, What I'm trying to do here is open the bank, but under the extraneous circumstance that a spell is selected, and no uptext ever appears consequently, it will click to de-activate the spell by clicking elsewhere)...