diff --git a/osrs/interfaces/login/login.simba b/osrs/interfaces/login/login.simba index f1ccc647..94400fc0 100644 --- a/osrs/interfaces/login/login.simba +++ b/osrs/interfaces/login/login.simba @@ -281,15 +281,17 @@ Example: WriteLn Login.ClearInput(ERSLoginInput.USERNAME); ``` *) -function TRSLogin.ClearInput(field: ERSLoginInput): Boolean; +function TRSLogin.ClearInput(field: ERSLoginInput): Boolean; begin if not Self.InputIsFilled(field) then Exit(True); if not Self.SelectInput(field) then Exit; - Keyboard.KeyDown(EKeyCode.BACK); + while self.InputIsFilled(field) do + Keyboard.KeyPress(EKeyCode.BACK); + Result := SleepUntil(not Self.InputIsFilled(field), RandomMode(100, 50, 1500), 6000); Keyboard.KeyUp(EKeyCode.BACK); -end; +end; (* ## Login.FillInput