From c9303904bdf5473a21310a2741f4a7575ae0d52e Mon Sep 17 00:00:00 2001 From: david Date: Fri, 20 Dec 2019 07:42:46 -0600 Subject: [PATCH] Update 'D3K.ahk' Maybe it will stop erroring out constantly. Nothing was changed, but it keeps throwing errors --- D3K.ahk | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/D3K.ahk b/D3K.ahk index 3fd1277..87bf7ff 100644 --- a/D3K.ahk +++ b/D3K.ahk @@ -74,6 +74,10 @@ If (glovar = 1) SetTimer, GloVar, 2000 ; Check every 2 seconds GloVar: + If FileExist("glovar.ahk") + { + Run glovar.ahk + } WinWaitNotActive, GloVar.ini ; So that we don't get any problems with the file on disk being out of date. I use VSCode with the "Save on lose focus" option on, YMMV { fileread, newFileContent, %glovarini% @@ -152,16 +156,10 @@ GloVar: ini_writeValue(glovarini, "dus", dealinfo.user) ; Writes demo account name (somewhat useful) ini_writeValue(glovarini, "xID", REValue) ; Writes the xID entered, but uppercase } - If FileExist("glovar.ahk") - { - Run glovar.ahk - } - Goto, GloVar } fileread, lastFileContent, %glovarini% ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code } - - If (RESection) ; If we have a secion + If (RESection) ; If we have a section { StoredSection := RESection If InStr(RESection, "clear") ; Will clear the ini and save its and the documentation file's contents to a log @@ -174,19 +172,17 @@ GloVar: FileAppend, % "`n`n`n`n" writethis "`n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", %A_MyDocuments%/D3KLog.txt ; Write a few new lines , the content, and a line underneath FileCopy, glovarsource, %glovarini%, 1 ; Copies and replaces any text in glovar.ini with the template fileread, lastFileContent, %glovarini% ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code - FileDelete, glovar.ahk ; A CLEAN SLATE + FileDelete, glovar.ahk ; THE CLEAN SLATE FileAppend, #SingleInstance force`n`n, glovar.ahk Sleep, 500 - Run glovar.ahk - Break ; Makes sure we're done with this loop and go to the right place } } - If FileExist("glovar.ahk") - { - Run glovar.ahk - } } Return + If FileExist("glovar.ahk") + { + Run glovar.ahk + } } } Return @@ -485,12 +481,19 @@ SetTitleMatchMode, 2 return #If -#If, not(email = "LastnameFirstname@example.com") ; Same as above +#If, not(email = "LastnameFirstname@JohnDeere.com") ; Same as above :*:@me:: Send, %email% Return #If +; R2 Shared Inbox +#If, ger = "1" + :*:@amse:: + Send, %amse% + Return +#If + ; JD Names #If, jdpn = "1"