From a2762ab62011044e98b8152a4d0fe41762df6ebe Mon Sep 17 00:00:00 2001 From: Yuriy Date: Thu, 26 Jan 2023 23:28:26 -0500 Subject: [PATCH] Fixed and expanded Parler login check --- Freedomain Social Media Poster.ahk | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Freedomain Social Media Poster.ahk b/Freedomain Social Media Poster.ahk index e5664dc..5b722ac 100644 --- a/Freedomain Social Media Poster.ahk +++ b/Freedomain Social Media Poster.ahk @@ -894,7 +894,7 @@ ScriptRunTime := round(((A_TickCount - StartTime) / 1000), 2) if(URLOfLastErrorPage != ""){ Message = Activating Tab of last failed post. SaveOrPostProgress(Message:=Message,PostType:="Tooltip") -; DevModeMsgBox("pause") + ; DevModeMsgBox("pause") ; message = URLOfLastErrorPage: %URLOfLastErrorPage% ; DevModeMsgBox(URLOfLastErrorPage) FindAndActivateTab(URLOfLastErrorPage) @@ -1325,9 +1325,21 @@ if(Status){ } + ; Check login status by checking the header of the page for "Feed" text -js = return document.querySelector(".header__contain").innerText -try status := driver.executeScript(js) +loop, 5 { + SaveOrPostProgress(Message:="Checking Login Status",PostType:="Tooltip,ErrorLoggingTextFile") + js = return document.querySelector(".header__contain").innerText + try status := driver.executeScript(js) + + if(Status) + continue + + sleep, 1000 +} + +; DevModeMsgBox(status) +; Msgbox % "status: " status if(!InStr(status, "Feed")){ ; SaveOrPostProgress(Message:="Login Expired. Please log back in",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") SaveOrPostProgress(Message:="Login Expired. Please log back in",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")