From d53f6651ea337407b4f011d3c4a637744f392a2c Mon Sep 17 00:00:00 2001 From: Yuriy Date: Thu, 26 Jan 2023 23:07:21 -0500 Subject: [PATCH] Updated Debug tool with 1 example and removed code used for testing purposes --- ...ToActiveChromeTab.ahk => ConnectToActiveChromeTab.ahk} | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) rename Tools/{ConnecToActiveChromeTab.ahk => ConnectToActiveChromeTab.ahk} (95%) diff --git a/Tools/ConnecToActiveChromeTab.ahk b/Tools/ConnectToActiveChromeTab.ahk similarity index 95% rename from Tools/ConnecToActiveChromeTab.ahk rename to Tools/ConnectToActiveChromeTab.ahk index 8e7d786..710930d 100644 --- a/Tools/ConnecToActiveChromeTab.ahk +++ b/Tools/ConnectToActiveChromeTab.ahk @@ -19,8 +19,10 @@ Chrome_Window_Title := Chrome_Window_Title[1] Driver := ConnectToChrome("", ConnectActiveTab := 1, ActiveTabTitle := Chrome_Window_Title) ; open new tab page with with specified profile +; This script can be used to connect to your currently active Chrome tab and for quick debugging purposes + ;---MAIN SCRIPT--------------------------------------------------------------------- -js = return document.querySelector(".header__contain").innerText +js = document.querySelector('[id^="What's on your mind"]')[0].click(); try status := driver.executeScript(js) ExitApp @@ -29,7 +31,6 @@ ExitApp - ConnectToChrome(URL := "", ConnectActiveTab := 0, WinGetActiveChromeTabTitle := ""){ ; Msgbox % "WinGetActiveChromeTabTitle: " WinGetActiveChromeTabTitle IP_Port := "127.0.0.1:9222" @@ -62,9 +63,6 @@ ConnectToChrome(URL := "", ConnectActiveTab := 0, WinGetActiveChromeTabTitle := } } - ; yuriy's settings - ; IniRead, ChromeFilepath, C:\Users\%A_username%\Documents\Autohotkey\Lib\ScriptSettings.ini, Selenium, %A_Computername%, %A_Space% - ; Establish Variable with Filepath to be used throughout the script if(ChromeFilepath = ""){ if(FileExist("C:\Program Files\Google\Chrome\Application\chrome.exe")){