From 075859934a7a73dfbcdd0663e1216ec230e429f4 Mon Sep 17 00:00:00 2001 From: Yuriy Date: Wed, 17 Apr 2024 17:09:08 -0400 Subject: [PATCH] bug fixes for when there are no errorlog filepath or discord webhook --- API-Functions.ahk | 5 +++++ General-Functions.ahk | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/API-Functions.ahk b/API-Functions.ahk index 5e205c3..516ddf7 100644 --- a/API-Functions.ahk +++ b/API-Functions.ahk @@ -5,6 +5,11 @@ ; -------------------------------Discord------------------------------- PostToDiscordChannel(Message,WebhookChannel){ + + ; Don't try to post a message if there is no webhook url + if(WebhookChannel = "") + Return + ; Msgbox % "Message: " Message ; Msgbox % "WebhookChannel: " WebhookChannel diff --git a/General-Functions.ahk b/General-Functions.ahk index 816b92c..5f2ab8f 100644 --- a/General-Functions.ahk +++ b/General-Functions.ahk @@ -102,6 +102,11 @@ TimedToolTip(Text, x="", y="",RemoveAfterTime:=2000, SetWhichToolTip="") { ; -------------------------------LogErrorsToTextFile------------------------------- Func_LogErrorsToTextFile(Text){ + + ; Do not log if we do not have an errorlog filepath + if(ErrorLoggingFilePath = "") + return + ; ErrorLoggingFile := Filepath FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss text =