From e15f45c67a8bbe6fea5d39d1bca1ae197d720be5 Mon Sep 17 00:00:00 2001 From: yuriy Date: Fri, 28 Jul 2023 10:54:50 -0400 Subject: [PATCH] moved global variables to proper file, added extra error logging for Chrome --- Chrome-Functions.ahk | 20 +++++++++++++++++++- General-Functions.ahk | 7 +++++++ Selenium-Functions.ahk | 9 --------- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Chrome-Functions.ahk b/Chrome-Functions.ahk index 8d5b224..5b1c26e 100644 --- a/Chrome-Functions.ahk +++ b/Chrome-Functions.ahk @@ -1,9 +1,24 @@ ; Notes/Extra Info/#Includes ;------------------------------------------------ -; Chrome Related Functions +; Chrome Global Variables +;------------------------------------------------ +; Chrome/Selenium +global ChromeFilepath +; Declare global variables here so they don't have to be declared in each script +global ChromeTabsURLArray +global DriverTitleArray +global LastWebsitePostURL +global CurrentTabURL +global URLOfLastErrorPage + + + + +; Chrome Related Functions +;------------------------------------------------ GetChromeFilepath(){ ; ChromeFilepath is global variable ; Establish Variable with Filepath to be used throughout the script @@ -12,6 +27,9 @@ GetChromeFilepath(){ if(FileExist(ChromePortableFilepath)){ ChromeFilepath := ChromePortableFilepath + + Message = Using Chromium Portable for Upload + SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") } else { if(FileExist("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")) diff --git a/General-Functions.ahk b/General-Functions.ahk index d10aa88..49c5264 100644 --- a/General-Functions.ahk +++ b/General-Functions.ahk @@ -4,6 +4,13 @@ ; -------------------------------Variables------------------------------- ; Declare global variables here so they don't have to be declared in each script +global ChromeTabsURLArray +global DriverTitleArray +global LastWebsitePostURL +global CurrentTabURL +global URLOfLastErrorPage + + DevModeMsgBox(Message){ diff --git a/Selenium-Functions.ahk b/Selenium-Functions.ahk index 7b9d012..fa8ff2c 100644 --- a/Selenium-Functions.ahk +++ b/Selenium-Functions.ahk @@ -3,15 +3,6 @@ ; Selenium Related Functions -; Global Variables -;------------------------------------------------ -; Declare global variables here so they don't have to be declared in each script -global ChromeTabsURLArray -global DriverTitleArray -global LastWebsitePostURL -global CurrentTabURL -global URLOfLastErrorPage - ShowSeleniumErrorMsgbox(){ ; Clipboard := ChromeVersion