From 1f45fee98d7939fb562baff61f0af3d36dbbce74 Mon Sep 17 00:00:00 2001 From: Torwent Date: Fri, 27 Sep 2024 16:35:17 +0200 Subject: [PATCH] fix: better tanscreen click logic --- optional/interfaces/mainscreen/tanscreen.simba | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/optional/interfaces/mainscreen/tanscreen.simba b/optional/interfaces/mainscreen/tanscreen.simba index 3912630e..c82f5886 100644 --- a/optional/interfaces/mainscreen/tanscreen.simba +++ b/optional/interfaces/mainscreen/tanscreen.simba @@ -85,14 +85,12 @@ end; function TRSTanScreen.ClickHide(hide: ERSHide; option: String = 'Tan All'; waitTime: Int32 = -1): Boolean; begin Result := Self.HoverHide(hide); + if not Result then Exit; - if not Result then - Exit; - - if (option <> '') or (option <> 'Tan 1') then - Result := ChooseOption.Select(option) //if we chooseoption we might want to reset result. + if (option = '') or MainScreen.IsUpText('Tan All') then + Mouse.Click(MOUSE_LEFT) else - Mouse.Click(MOUSE_LEFT); + Result := ChooseOption.Select(option); //if we chooseoption we might want to reset result. if waitTime > 0 then Result := WaitUntil(not Self.IsOpen(), 100, waitTime);