30 Commits
Author SHA1 Message Date
david 84f9a6b603 Merge branch 'tier2' 2026-09-09 20:27:23 -05:00
david 0cefd963b6 Update D3K.ahk 2026-09-09 14:14:03 -05:00
david bbfbaf4034 Update func.ahk 2026-09-09 14:13:29 -05:00
david a54571f6cd Update msmv.ahk 2026-08-28 12:29:53 -05:00
david ec815b5314 Delete emails.example.csv 2026-08-28 12:29:32 -05:00
david 5aa7108086 Update glovarsource 2026-08-28 12:29:20 -05:00
david 409f6b9b4c Delete directory 'standalones' 2026-08-28 12:28:29 -05:00
david 32a5b74f71 Delete icons/manual.ico 2026-08-28 12:27:48 -05:00
david 9fd247681a Update func.ahk 2026-08-28 12:27:28 -05:00
david 946e4b7be8 no longer needed 2026-08-28 12:26:42 -05:00
david 2129e733d1 Update Settings.ahk 2026-08-28 12:18:25 -05:00
david c9ef223131 no longer needed 2026-08-28 12:18:05 -05:00
david 03f34dd75e upgrade to ahk v2 2026-08-28 12:17:30 -05:00
david a704be9088 Delete Case_Formatter.ahk 2026-08-28 12:15:27 -05:00
david 31ab7b9c59 Update .gitignore 2026-08-28 12:14:42 -05:00
david 748e3ab321 update to AHK v2 2026-07-08 11:54:28 -05:00
david 9e8ed05b4e update to AHK v2 2026-06-17 12:09:10 -05:00
David Daily 9b9405c7d1 minor changes 2023-07-17 12:30:38 -05:00
David Daily 0fb614940f update regex for ini key search 2023-07-14 11:10:18 -05:00
david 5a4d36ff44 make everything better 2023-02-01 14:42:26 -06:00
david d434dc3f1e Update 'standalones/Mansol_Opener - standalone.ahk' 2022-01-13 14:21:49 -06:00
david 2a4cf2dbda replace ugly CCMS link with Service Advisor 2022-01-13 13:47:41 -06:00
david 0d596fd2d4 replace ugly CCMS link with Service Advisor link 2022-01-13 13:47:10 -06:00
david c7d3567790 compressed code, improved some logic 2020-05-22 13:41:42 -05:00
david b4637072a2 Add MouseMover, available through right click of tray icon 2020-05-18 16:56:41 -05:00
david cc3863b0d2 Correct GSC Prepared
also, alphabetized lists of shortcuts
2020-04-10 10:17:44 -05:00
david dcb2e97426 Merge pull request 'mrlangford-patch-1' (#2) from mrlangford-patch-1 into master
Reviewed-on: #2
2020-04-10 10:07:30 -05:00
david 9c1b4c85f4 GSC Prepared hinzufügen 2020-04-10 10:04:56 -05:00
MrLangford 4efd802be3 grammatik richten 2020-04-10 09:55:31 -05:00
david 5bbbbad247 adding support for a different first name, because of that an improvement to the settings dialog was needed 2020-03-11 10:55:20 -05:00
13 changed files with 441 additions and 1081 deletions
+3
View File
@@ -1,3 +1,6 @@
*.code-workspace *.code-workspace
SmartGooey/* SmartGooey/*
Projects/* Projects/*
emails.example.csv
.gitignore
.zip
-346
View File
@@ -1,346 +0,0 @@
#Include, func.ahk
; Holy crap I need to rewrite this for v3...
SetTitleMatchMode, 2
; These next 3 options make it so that it's always on top, it there are no buttons, and doesn't show up in the alt-tab or taskbar
Gui,+AlwaysOnTop
Gui, +ToolWindow
Contact := 2
CurrTimeEN := GetDateTime("en")
CurrTimeDE := GetDateTime("de")
;------------------------------------------------------------------------------
; GUI creation
;------------------------------------------------------------------------------
; The & in front of the letters lets you hold alt and press the first letter instead of having to click on it. That is why its "Mail", not "E-Mail"
Gui, Add, Radio, x12 y3 w60 h20 Group vLang Checked, &English ; First group of Radio buttons
Gui, Add, Radio, x12 y23 w60 h20, &German
Gui, Add, Radio, x82 y3 w60 h20 Group vAct, &Warrant
Gui, Add, Radio, x82 y23 w60 h20, &Demo
Gui, Add, Text, x75 y46 w150 h20 gTime, %CurrTimeEN%
Gui, Add, Button, x12 y43 w55 h20 Default vHidden, Go ; That way you don't have to have an actual button, it just happens when you press enter.
if (cfmail)
{
Gui, Add, Radio, x142 y3 w80 h20 Group vContact Checked, E-&Mail ; Second group of Radio buttons
Gui, Add, Radio, x142 y23 w80 h20 , &Call
Gui, Show, h70 w210, Contact
} Else {
Gui, Show, h70 w145, Contact
}
Return
Time:
Run, addemail.ahk
GuiClose:
GuiEscape:
ExitApp
;------------------------------------------------------------------------------
; Buttons
;------------------------------------------------------------------------------
ButtonGo:
Gui, submit
Goto, Write
Return
/*
Contact
Mail: 1
Call: 2
Lang
English: 1
German: 2
Act
Warrant: 1
Demo: 2
*/
Write:
{
FileRead, NewLine, %docfile% ; Read the documentation file
If (NewLine != "") ; If there is something in the file, this would return a string
{
FileAppend,`n`n`n`n, %docfile% ; Inserts a new line so that it isn't just appended directly to the end
}
NewLine := "" ; Free up Memory cause this could be quite a bit of stuff
;------------------------------------------------------------------------------
; Email
;------------------------------------------------------------------------------
If (Contact = "1")
{
If (Lang = "1") ; English
{
If (Act = "0") ; Not an activation
{
FileAppend,Dealer emailed: "", %docfile%
}
If (Act = "1") ; Warrant
{
FileAppend,Dealer emailed for warrant transfer: ""`n`nOld SN: `nNew SN: `nChallenge Code: `n`n, %docfile%
}
If (Act = "2") ; Demo
{
FileAppend,Dealer emailed for `n`nSN: `nChallenge Code: `n`n, %docfile%
}
}
Else If (Lang = "2") ; German
{
If (Act = "0") ; Not an activation
{
FileAppend,Händler emailte: "", %docfile%
}
Else If (Act = "1") ; Warrant
{
FileAppend,Händler emailte für Garantieübertragung`n`nAlte SN: `nNeue SN: `nAuthentisierungscode: `n`n, %docfile%
}
Else If (Act = "2") ; Demo
{
FileAppend,Händler emailte für `n`nSN: `nAuthentisierungscode: `n`n, %docfile%
}
}
}
;------------------------------------------------------------------------------
; Call
;------------------------------------------------------------------------------
Else If (Contact = "2")
{
If (Lang = "1") ; English
{
FileAppend, Call received %CurrTimeEN%.`n`n, %docfile%
If (Act = "0") ; Not an activation
{
FileAppend,Dealer called for , %docfile%
}
Else If (Act = "1") ; Warrant
{
FileAppend,Dealer called for Warrant transfer`nOld SN: `nNew SN: `nChallenge Code: `n`n, %docfile%
}
Else If (Act = "2") ; Demo
{
FileAppend,Dealer called for Demo`nSN: `nChallenge Code: `n`n, %docfile%
}
}
Else If (Lang = "2") ; German
{
FileAppend, Anruf wurde %CurrTimeDE% entgegengenommen.`n`n, %docfile%
If (Act = "0") ; Not an activation
{
FileAppend,Händler rief an mit , %docfile%
}
Else If (Act = "1") ; Warrant
{
FileAppend,Händler rief an für Garantieübertragung`nAlte SN: `nNeue SN: `nAuthentisierungscode: `n`n, %docfile%
}
Else If (Act = "2") ; Demo
{
FileAppend,Händler rief an für Demo`nSN: `nAuthentisierungscode: `n`n, %docfile%
}
}
}
ExitApp
}#Include, func.ahk
SetTitleMatchMode, 2
; These next 3 options make it so that it's always on top, it there are no buttons, and doesn't show up in the alt-tab or taskbar
Gui,+AlwaysOnTop
Gui, +ToolWindow
docfile := ini_get(ini, "USpec", "DocFile")
cfmail := ini_get(ini, "Main", "CFmail")
Contact := 2
CurrTimeEN := GetDateTime("en")
CurrTimeDE := GetDateTime("de")
;------------------------------------------------------------------------------
; GUI creation
;------------------------------------------------------------------------------
; The & in front of the letters lets you hold alt and press the first letter instead of having to click on it. That is why its "Mail", not "E-Mail"
Gui, Add, Radio, x12 y3 w60 h20 Group vLang Checked, &English ; First group of Radio buttons
Gui, Add, Radio, x12 y23 w60 h20, &German
Gui, Add, Radio, x82 y3 w60 h20 Group vAct, &Warrant
Gui, Add, Radio, x82 y23 w60 h20, &Demo
Gui, Add, Button, x12 y43 w55 h20 Default vHidden, Go ; That way you don't have to have an actual button, it just happens when you press enter.
if (cfmail)
{
Gui, Add, Radio, x142 y3 w80 h20 Group vContact Checked, E-&Mail ; Second group of Radio buttons
Gui, Add, Radio, x142 y23 w80 h20 , &Call
Gui, Add, Text, x75 y46 w150 h20 gTime, %CurrTimeEN%
Gui, Show, h70 w210, Contact
} Else {
Gui, Show, h70 w145, Contact
}
Return
Time:
Run, addemail.ahk
GuiClose:
GuiEscape:
ExitApp
;------------------------------------------------------------------------------
; Buttons
;------------------------------------------------------------------------------
ButtonGo:
Gui, submit
Goto, Write
Return
/*
Contact
Mail: 1
Call: 2
Lang
English: 1
German: 2
Act
Warrant: 1
Demo: 2
*/
Write:
{
FileRead, NewLine, %docfile% ; Read the documentation file
If (NewLine != "") ; If there is something in the file, this would return a string
{
FileAppend,`n`n`n`n, %docfile% ; Inserts a new line so that it isn't just appended directly to the end
}
NewLine := "" ; Free up Memory cause this could be quite a bit of stuff
;------------------------------------------------------------------------------
; Email
;------------------------------------------------------------------------------
If (Contact = "1")
{
If (Lang = "1") ; English
{
If (Act = "0") ; Not an activation
{
FileAppend,Dealer emailed: "", %docfile%
}
If (Act = "1") ; Warrant
{
FileAppend,Dealer emailed for warrant transfer: ""`n`nOld SN: `nNew SN: `nChallenge Code: `n`n, %docfile%
}
If (Act = "2") ; Demo
{
FileAppend,Dealer emailed for `n`nSN: `nChallenge Code: `n`n, %docfile%
}
}
Else If (Lang = "2") ; German
{
If (Act = "0") ; Not an activation
{
FileAppend,Händler emailte: "", %docfile%
}
Else If (Act = "1") ; Warrant
{
FileAppend,Händler emailte für Garantieübertragung`n`nAlte SN: `nNeue SN: `nAuthentisierungscode: `n`n, %docfile%
}
Else If (Act = "2") ; Demo
{
FileAppend,Händler emailte für `n`nSN: `nAuthentisierungscode: `n`n, %docfile%
}
}
}
;------------------------------------------------------------------------------
; Call
;------------------------------------------------------------------------------
Else If (Contact = "2")
{
If (Lang = "1") ; English
{
FileAppend, Call received %CurrTimeEN%.`n`n, %docfile%
If (Act = "0") ; Not an activation
{
FileAppend,Dealer called for , %docfile%
}
Else If (Act = "1") ; Warrant
{
FileAppend,Dealer called for Warrant transfer`nOld SN: `nNew SN: `nChallenge Code: `n`n, %docfile%
}
Else If (Act = "2") ; Demo
{
FileAppend,Dealer called for Demo`nSN: `nChallenge Code: `n`n, %docfile%
}
}
Else If (Lang = "2") ; German
{
FileAppend, Anruf wurde %CurrTimeDE% entgegengenommen.`n`n, %docfile%
If (Act = "0") ; Not an activation
{
FileAppend,Händler rief an mit , %docfile%
}
Else If (Act = "1") ; Warrant
{
FileAppend,Händler rief an für Garantieübertragung`nAlte SN: `nNeue SN: `nAuthentisierungscode: `n`n, %docfile%
}
Else If (Act = "2") ; Demo
{
FileAppend,Händler rief an für Demo`nSN: `nAuthentisierungscode: `n`n, %docfile%
}
}
}
ExitApp
}
+242 -355
View File
@@ -1,128 +1,99 @@
#Include, func.ahk #Include "func.ahk"
Menu, Tray, Icon, shell32.dll, 283 ; Set the tray icon to a keyboard DetectHiddenWindows true
Menu, Tray, Add, &Mouse Mover, Mouse_Mover ; Add item to the tray to move the mouse
Menu, Tray, Add, Settings, D3K_Settings ; Add item to the tray to move the mouse
Menu, Tray, Add, %A_AhkVersion%, docs
A_TrayMenu.Add("&Mouse Mover", MsMv) ; Add item to the tray to move the mouse
A_TrayMenu.Add("&Settings", D3K_Settings) ; Add item to the tray for the settings window
A_TrayMenu.Add(A_AhkVersion, docs)
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Global Variables ; Global Variables
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
If (glovar) If (settings["GloVar"])
{ {
SetTimer, GloVar, 2000 ; Check every 2 seconds global glovarini := A_MyDocuments "\GloVar.ini" ; Location of the ini that the user modifies
global gvMod := FileGetTime(glovarini)
SetTimer(GloVar, 2000) ; Check every 2 seconds
GloVar: GloVar(*){
glovarini := A_MyDocuments "\GloVar.ini" ; Location of the ini that the user modifies If !(WinActive("GloVar.ini")){ ; Only run when the window isn't active, prevents accidential editing by the script while the user is editing
glovarscript := A_Temp "\GloVar.ahk" ; Doesn't need to be anywhere useful as it doesn't contain any external references gvModNew := FileGetTime(glovarini)
;FileGetTime, gvMod, %glovarini%, M
glovarstart := "#SingleInstance force`n#NoTrayIcon`nSendMode, Input`nFileEncoding, UTF-8`n"
If (WinActive("GloVar.ini")) ; Only run when the window isn't active, prevents accidential editing by this while the user is
{
Return
}
FileGetTime, gvModNew, %glovarini%, M
If !(gvModNew = gvMod) ; Those two lines mean the rest of this only executes if there were changes to the ini. If !(gvModNew = gvMod) ; Those two lines mean the rest of this only executes if there were changes to the ini.
{ {
SetTimer, GloVar, Off glovarscript := A_Temp "\GloVar.ahk" ; self-contained, no reference to any other AHK scripts
hotstrings := "" glovarstart := "#Requires AutoHotkey v2`n#SingleInstance force`n#NoTrayIcon`n"
glovar_array := ini_load(glovarini) hotstrings := "" ; Stop ahk from complaining about it not having a value. Just ignore it bro
For sec in glovar_array SetTimer(GloVar, 0) ; Stop the timer while we work on the file
glovar_map := ini_load(glovarini)
For section in glovar_map {
For key, value in glovar_map[section]
{ {
For key, value in glovar_array[sec] Switch section, 0
{ {
If (value) Case "Serial Numbers":
{ value := StrUpper(value) ; Makes it uppercase
sec := StrReplace(sec, "§", " ") ; AHK can't handle spaces in nested array names, so they're substituted with § when entered into the array. This reverses that. ini_write(glovarini, key, value)
StringCaseSense, Off ; Make sure the capitalization doesn't matter Case "Info":
Switch sec If (key = "case")
{ {
Case "Serial Numbers": value := StrUpper(value) ; Makes it uppercase, just in case it was manually typed
StringUpper, value, value ; Makes it uppercase ini_write(glovarini, key, value) ; Writes the properly formatted case number to glovar.ini
ini_write(glovarini, key, value)
Case "Info":
If (key = "case")
{
StringUpper, value, value ; Makes it uppercase, just in case it was manually typed
value := Trim(value, "()")
ini_write(glovarini, key, value) ; Writes the properly formatted case number to glovar.ini
}
Case "Clear": ; Will clear the ini and save its and the documentation file's contents to a log
temp := FileOpen(docfile, "r")
doctemp := temp.Read()
temp.Close()
temp := FileOpen(glovarini, "r")
initemp := temp.Read()
temp.Close()
initemp := RegExReplace(initemp, "i)(?<=\[)clear(?=\])", "Info") ; Replace the "clear" section we set with Info, case insensitive
CurrTime := GetDateTime("en") ; get the current date and time as "YYYY-MM-DD at HH:MM GMT"
temp := FileOpen(A_MyDocuments "/D3KLog.txt", "a")
writethis := "Case on " . CurrTime . "`n`n`n" . doctemp . "`n`n" . initemp ; Save the current time, what was in the doc file, and glovarini to a variable
temp.Write("`n`n" writethis "`n`n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
temp.Close()
temp := FileOpen("glovarsource", "r")
glovarsource := temp.Read()
temp.Close()
temp := FileOpen(glovarini, "w")
temp.Write(glovarsource) ; Overwrite .ini for a clean slate
temp.Close()
temp := FileOpen(docfile, "w") ; Overwrites documentation for a clean slate
temp.Close()
script := FileOpen(glovarscript, "w")
script.Write(glovarstart)
script.Close()
Run, %A_AhkPath% %glovarscript% ; Just in case. Don't want an old version running.
ToolTip, Cleared
Sleep, 500
ToolTip
FileGetTime, gvMod, %glovarini%, M ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code
SetTimer, GloVar, On
Goto, GloVar ; Don't do anything else below this line, Break wasn't taking "GloVar" as a variable
Case (RegExMatch(sec, "i)sdrbr(\d*)", m) ? sec : !sec): ; for cases with Stolen displays
If (m1) ; sometimes there are multiple stolen displays, this is to account for that.
{
writethis := "[Serial Numbers]"
Loop, % m1
writethis .= "`ns" A_Index "=`nr" A_Index "=`ncc" A_Index "=`nv" A_Index "="
writethis .= "`n[Info]"
Loop, % m1
writethis .= "`ncase" A_Index "="
} Else {
writethis := "[Serial Numbers]`ns=`nr=`ncc=`nv=`n[Info]`ncase=" glovar_array[sec, "case"]
}
temp := FileOpen(glovarini, "w")
temp.Write(writethis)
temp.Close()
script := FileOpen(glovarscript, "w")
script.Write(glovarstart)
script.Close()
SetTimer, GloVar, On
Goto, GloVar ; Don't do anything else below this line, Break wasn't taking "GloVar" as a variable
} }
hotstrings .= "`n:*:$" key "::" value Case "Clear": ; Will clear the ini and save its and the documentation file's contents to a log
} temp := FileOpen(settings["DocFile"], "r")
doctemp := temp.Read()
temp.Close()
temp := FileOpen(glovarini, "r")
initemp := temp.Read()
temp.Close()
initemp := RegExReplace(initemp, "i)(?<=\[)clear(?=\])", "Info") ; Replace the "clear" section we set with Info, case insensitive
temp := FileOpen(A_MyDocuments "/D3KLog.txt", "a")
writethis := "Case on " FormatTime(A_NowUTC, "yyyy-MM-dd") "`n`n" doctemp "`n`n" initemp ; Save the current time, what was in the doc file, and glovarini to a variable
temp.Write("`n`n" writethis "`n`n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
temp.Close()
temp := FileOpen("glovarsource", "r")
glovarsource := temp.Read()
temp.Close()
temp := FileOpen(glovarini, "w")
temp.Write(glovarsource) ; Overwrite .ini for a clean slate
temp.Close()
temp := FileOpen(settings["DocFile"], "w") ; Overwrites documentation for a clean slate
temp.Close()
script := FileOpen(glovarscript, "w")
script.Encoding := "UTF-8"
script.Write(glovarstart)
script.Close()
Run(glovarscript) ; Just in case. Don't want an old version running.
ToolTip("Cleared")
Sleep(500)
ToolTip()
global gvMod := FileGetTime(glovarini) ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code
SetTimer(GloVar, 2000) ; Check every 2 seconds
Return
} }
If (value){ ; skip trying to write a hotstring that doesn't do anything
hotstrings .= "`n:*:$" key "::" value
}
}}
If (hotstrings){ ; skip trying to write to the file if there aren't any hotstrings (as in any time it's cleared)
script := FileOpen(glovarscript, "w")
script.Write(glovarstart hotstrings)
script.Close()
Run(A_AhkPath " " glovarscript)
ToolTip("GloVars updated")
Sleep(500)
ToolTip()
}
global gvMod := FileGetTime(glovarini) ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code
SetTimer(GloVar, 2000) ; Check every 2 seconds
If (settings["msmv"] = "no-running" or settings["msmv"] = "yes-running") ; might as well update the checkboxes in the menu
{
A_TrayMenu.Check("&Mouse Mover")
} else { ; have to include ampersand to refer to it by name!
A_TrayMenu.UnCheck("&Mouse Mover")
} }
file := FileOpen(glovarini, "r")
temp := file.Read()
file.Close()
temp := RegExReplace(temp, "`am)^[\s\R]*") ; Get rid of empty lines
temp := RegExReplace(temp, "m)[ \t]+$") ; Get rid of extra space at the end of strings
temp := Trim(temp, " `t`r`n") ; Remove pesky newlines and extra space at the end
file := FileOpen(glovarini, "w")
file.Write(temp)
file.Close()
script := FileOpen(glovarscript, "w")
script.Write(glovarstart hotstrings)
script.Close()
Run, %A_AhkPath% %glovarscript%
ToolTip, GloVars updated
Sleep, 500
ToolTip
FileGetTime, gvMod, %glovarini%, M ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code
SetTimer, GloVar, On
} }
}}
Return Return
} }
@@ -130,59 +101,60 @@ If (glovar)
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Settings window ; Settings window
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
D3K_Settings: !+\::D3K_Settings() ; Alt+Shift+\
!+\::Run Settings.ahk ; Alt+Shift+\ D3K_Settings(*)
Return {
Run("Settings.ahk")
}
docs(*){
Run("https://www.autohotkey.com/docs/AutoHotkey.htm")
}
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Mouse Mover ; Mouse Mover todo: autostart
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
Mouse_Mover: MsMv(ItemName, ItemPos, MyMenu)
If (msmv_active = True) {
{ settings := ini_load(sett_ini)
Run, %A_AhkPath% "msmv.ahk" "off" switch settings["msmv"] { ; couldn't find a good way to detect if it's running or not so now we have this.
msmv_active := False ; Have to do this cause AHK doesn't have a builtin function to detect if something is checked or not. case "always-running": ; run at refresh of d3k. if currently running, stop
Menu, Tray, Uncheck, &Mouse Mover Run A_ScriptDir "\msmv.ahk off"
MyMenu.Uncheck(ItemName)
ini_write(sett_ini, "msmv", "always-stopped")
case "always-stopped": ; run at refresh, currently stopped. if currently stopped, start
Run A_ScriptDir "\msmv.ahk on"
MyMenu.Check(ItemName)
ini_write(sett_ini, "msmv", "always-running")
case "no-running": ; don't run at refresh, currently running. if currently running, stop
Run A_ScriptDir "\msmv.ahk off"
MyMenu.Uncheck(ItemName)
ini_write(sett_ini, "msmv", "no-stopped")
case "no-stopped": ; don't run at refresh, currently stopped. if currently stopped, start
Run A_ScriptDir "\msmv.ahk on"
MyMenu.Check(ItemName)
ini_write(sett_ini, "msmv", "no-running")
default:
MsgBox("Unexpected value `"" settings["msmv"] "`" in D3Ksettings.ini")
Reload
} }
Else }
{
Run, %A_AhkPath% "msmv.ahk" "on" cleanup(*) ; to make sure msmv closes when we close d3k
msmv_active := True {
Menu, Tray, Check, &Mouse Mover settings := ini_load(sett_ini)
switch settings["msmv"] { ; couldn't find a good way to detect if it's running or not so now we have this.
case "always-running": ; run at refresh of d3k. if currently running, stop
Run A_ScriptDir "\msmv.ahk off"
ini_write(sett_ini, "msmv", "always-stopped")
case "no-running": ; don't run at refresh, currently running. if currently running, stop
Run A_ScriptDir "\msmv.ahk off"
ini_write(sett_ini, "msmv", "no-stopped")
} }
Return }
OnExit cleanup
;------------------------------------------------------------------------------
; DTAC Solution Opener
;------------------------------------------------------------------------------
#If (mansol) ; checks from the variable thats set from the .sett_ini file
!+S::Run Mansol_Opener.ahk ; Alt+Shift+S
#If
;------------------------------------------------------------------------------
; Case Formatter
;------------------------------------------------------------------------------
#If (CaseFormatter)
Pause::Run Case_Formatter.ahk ; The Pause|Break key
#If
;-------------------------------------------------------------------------------
; Special Characters
;-------------------------------------------------------------------------------
#If (ger)
!s::Send {U+00DF} ;Alt+S scharfes s / Eszett / ß
!a::Send {U+00E4} ;Alt+a ä
+!A::Send {U+00C4} ;Alt+A Ä
!o::Send {U+00F6} ;Alt+o ö
+!O::Send {U+00D6} ;Alt+O Ö
!u::Send {U+00FC} ;Alt+u ü
+!U::Send {U+00DC} ;Alt+U Ü
#If
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
; Capitalise dates ; Capitalise dates
@@ -206,7 +178,7 @@ Return
::december::December ::december::December
; German ; German
#If (ger) #HotIf (settings["German"])
::montag::Montag ::montag::Montag
::dienstag::Dienstag ::dienstag::Dienstag
::mittwoch::Mittwoch ::mittwoch::Mittwoch
@@ -223,243 +195,136 @@ Return
::juli::Juli ::juli::Juli
::oktober::Oktober ::oktober::Oktober
::dezebmer::Dezember ::dezebmer::Dezember
#If #HotIf
;------------------------------------------------------------------------------
; Copypastas
;------------------------------------------------------------------------------
; STWA Applied
:*:]cmy::
Send STWA applied{Enter 2}Status: Providing information{Enter 2}Comments: {Enter 2}Thank you,{Enter}%name%{Enter 2}Tier 2 internal steps:{Space}{Enter 2}SQL:{Enter}
Return
; STWA not available
:*:]cmn::
Send STWA not available{Enter 2}Status: Providing information{Enter 2}Comments: {Enter 2}Thank you,{Enter}%name%{Enter 2}Tier 2 internal steps:{Space}{Enter 2}SQL:{Enter}
Return
; Need info
:*:]cmr::
Send STWA available{Enter 2}Status: Requesting information{Enter 2}Comments: {Enter 2}Thank you,{Enter}%name%{Enter 2}Tier 2 internal steps:{Space}Verify information{Enter 2}SQL:{Enter}
Return
:*:]sdrbr::
glovar_array := ini_load(glovarini)
For sec in glovar_array
{
For key, value in glovar_array[sec]
{
If (value)
{
stln_%key% := value
}
}
}
If (glovar_array["Info"].Count() > 1)
{
Send Stolen Display Replacement Basics Requests{Tab}
Send Received some requests for replacement Basics for Stolen displays @
} Else {
Send %stln_case%{Tab}
Send Received a request for replacement Basics for a Stolen display @
}
Sleep, 1000
Send Stellar
Sleep, 1500
Send {Down}{Tab}:{Enter 2}
Sleep, 1000
Send {ShiftDown}{Tab 2}{ShiftUp}
Sleep, 1000
Send {Right 17}
Sleep, 1000
Send {Enter}
Sleep, 1000
Send {Right}
Send {Enter}
Sleep, 1000
If (glovar_array["Info"].Count() > 1)
{
Loop, % glovar_array["Info"].Count() {
If (A_Index < glovar_array["Info"].Count())
{
table := "^{b}Case " A_Index "{Tab}^{b}" stln_case%A_Index% "{Tab}Stolen{Tab}" stln_s%A_Index% "{Tab}Replacement{Tab}" stln_r%A_Index% "{Enter}" stln_cc%A_Index% "{Tab}Machine PIN{Tab}" stln_v%A_Index% "{Tab}Model, Year{Tab 2}Should it qualify?{Tab 2}"
} Else {
table := "^{b}Case " A_Index "{Tab}^{b}" stln_case%A_Index% "{Tab}Stolen{Tab}" stln_s%A_Index% "{Tab}Replacement{Tab}" stln_r%A_Index% "{Enter}" stln_cc%A_Index% "{Tab}Machine PIN{Tab}" stln_v%A_Index% "{Tab}Model, Year{Tab 2}Should it qualify?"
} ; That way it doesn't put the extra line at the very end
Send %table%
}
} Else {
Send Case{Tab}%stln_case%{Tab}Stolen{Tab}%stln_s%{Tab}Replacement{Tab}%stln_r%{Enter}%stln_cc%{Tab}Machine PIN{Tab}%stln_v%{Tab}Model, Year{Tab 2}Should it qualify?{Up 2}{Tab}
}
Return
; Transferring to DTAC
:*:]DTAC::
Send The ISG Global Support Center has determined that this case is hardware related`; therefore, this case is being transferred from the Global Support Center to the ISG DTAC group. A DTAC technician will now work this case via the DTAC system and provide a recommendation in the case Text if more information is needed or if a solution has been found. Please continue to update or check on the progress of this case by using the DTAC system Case Text section moving forward.
Return
; Transferring to Tier2
:*:]rrt::
Send This case was unable to be resolved and has been transferred to another team. Our Tier 2 team is investigating the issue to find a short-term resolution. We will update you as soon as we have a recommendation.
Return
; Update after 5 business days
:*:]upd::
Send A short-term resolution still has not been identified. We are requesting an immediate update on this case from our Tier 2 team. We will contact you as soon as we have a status update.
Return
; Requesting info
:*:]req::
Send A request has been made for additional information in this case. Please provide the following information as soon as possible so this case can be resolved.
Return
; Dealer defect
:*:]ddefect::
Send We have communicated your issue to the Product Support and Development Teams. We do not have a timeframe in which your issue will be resolved. At this time, we are closing the case as those teams track the issue. If you have any questions, please have your field team contact the appropriate Product Support Representative.
Return
; Customer defect
:*:]cdefect::
Send We have communicated your issue to the Product Support and Development Teams. We do not have a timeframe in which your issue will be resolved. At this time, we are closing the case as those teams track the issue. If you have any questions, please contact your preferred dealer and the field team can contact the appropriate Product Support Representative.
Return
; Workbasket shortcuts, place mouse over Transfer button before typing
:*:]pd::
Send PCDSC
Send {Click}
Return
:*:]pr::
Send PCRRT
Send {Click}
Return
:*:]p2::
Send PCTIER2
Send {Click}
Return
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Email ; Email
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
:*:]email:: :*:]email::
Send Hello,{Enter 2}{Space 3} {
Return Send "Hello,{Enter 2}{Space 3}"
}
; German ; German
#If (ger) #HotIf (settings["German"])
:*:[email:: :*:[email::{
Send Hallo,{Enter 2}{Space 3} Send "Hallo,{Enter 2}{Space 3}"
Return }
#If #HotIf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Profile email paste ; Profile email paste
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; So when editing Profiles, it won't let you paste in the email field. We don't like that. Make sure to let go of all keys immediatley after pressing this ; So when editing Profiles, it won't let you paste in the email field. We don't like that. Make sure to let go of all keys immediatley after pressing this
#If (mjdpaste)
#v:: #v::
sleep, 750 {
SendInput %clipboard% Sleep(750)
sleep, 500 SendInput(A_Clipboard)
send # ; to make sure the start menu isn't open for some reason }
Return
#If
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Common Terms autocorrect and replacement ; Common Terms autocorrect and replacement
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; JD Names
#If (jdpn) #HotIf (settings["JDProductNames"])
:*:[xx::XXXXXXXXXXXXX ; I'm not gonna try and find the right amount of X's to appease the CCMS demons
:*:]xx::XXXXXXXXXXXXX
; English ; English
:*:]at::AutoTrac :*:]at::AutoTrac
:*:]ba::Basics & AutoTrac :*:]bna::Basics & AutoTrac
:*:]sf::StarFire :*:]bfs::Basics for Services
:*:]jdl::JDLink :*:]bas::Basics, AutoTrac, and Section Control
:*:]jlb::JDLink Boost
:*:]jdp::JDParts :*:]jdp::JDParts
:*:]jdsm::John Deere Software Manager
:*:]macrep::Machine Reports
:*:]mjd::MyJohnDeere :*:]mjd::MyJohnDeere
:*:]muc::Master Unlock Code
:*:]oman::Operator's Manual
:*:]opsc::Operations Center :*:]opsc::Operations Center
:*:]rs::RowSense
:*:]seccon::Section Control :*:]seccon::Section Control
:*:]gs::GreenStar :*:]gs::GreenStar
:*:]cc::CommandCenter :*:]cc::CommandCenter
:*:]fc::Field Connect :*:]fc::Field Connect
:*:]rs::RowSense :*:]rs::RowSense
:*:]sub::subscription
:*:]ss::Stellar Support :*:]ss::Stellar Support
:*:]sub::subscription
:*:]tcsm::Territory Customer Support Manager
:*:]tman::Technical Manual :*:]tman::Technical Manual
:*:]oman::Operator's Manual :*:]tp::TouchPoint
:*:]hl3::HarvestLab 3000
:*:]hlo::Original HarvestLab
:*:]bin::Virtual Inventory
:*:]warrep::Warranty Reports :*:]warrep::Warranty Reports
:*:]tcsm::Territory Customer Support Manager :*:]tcsm::Territory Customer Support Manager
:*:]jdsm::John Deere Software Manager :*:]jdsm::John Deere Software Manager
:*:]jddm::John Deere Data Manager :*:]jddm::John Deere Data Manager
:*:]serva::Service Advisor :*:]serva::Service Advisor
:*:]muc::Master Unlock Code :*:]muc::Master Unlock Code
:*:]asmn::Asset Manager
:*:]bsm::Base Station Manager :*:]bsm::Base Station Manager
:*:]lm::License Manager
:*:]sas::See & Spray :*:]sns::See & Spray
:*:]s4::SF-RTK
:*:]ls::licenses
:*:]sub::subscription
:*:]agt::AgTech Code
::rowsense::RowSense ::rowsense::RowSense
:*:comar::COMAR ::comar::COMAR
::comars::COMARs
::mrtk::mRTK ::mrtk::mRTK
::rda::RDA ::rda::RDA
::rtk::RTK ::rtk::RTK
::autotrac::AutoTrac ::autotrac::AutoTrac
:*:ccms::CCMS ::ccms::CCMS
:*:dtac::DTAC ::comar::COMAR
::dtac::DTAC
::tcsm::TCSM ::tcsm::TCSM
::itec::iTEC Pro ::itec::iTEC Pro
::ssu::SSU ::ssu::SSU
::atu::ATU ::atu::ATU
:*:mtg::MTG :*:mtg::modem
::wdt::WDT
::itc::iTC ::itc::iTC
:*:vin::Machine PIN ; Not actually vehicles, so they don't have VINs ::vin::Machine PIN ; Not actually vehicles, so they don't have VINs
::gs2::GS2 ::gs2::GS2
::gs3::GS3 ::gs3::GS3
::g4::G4
::g5::G5
::sf1::SF1 ::sf1::SF1
::sf2::SF2 ::sf2::SF2
::sf3::SF3 ::sf3::SF3
::sf4::SF4
::xid::xID ::xid::xID
::pmcalc::PMCalc ::pmcalc::PMCalc
::vat::VAT ::VAT::VAT
:*:racf::RACF ::RACF::RACF
::igrade::iGrade ::igrade::iGrade
:*:JDCP::JDCP ::ISOBUS::ISOBUS
:*:ISOBUS::ISOBUS ::JDCP::JDCP
::LORT::LORT
::ISG::ISG
; German ; German
#If (ger) #HotIf (settings["German"])
:*:[at::AutoTrac :*:[at::AutoTrac
:*:[ba::Basics & AutoTrac :*:[bna::Basics & AutoTrac
:*:[sf::StarFire :*:[bfs::Basics for Services
:*:[jdl::JDLink :*:[bas::Basics, AutoTrac, and Section Control
:*:[sf4::SF-RTK
:*:[jlb::JDLink Boost
:*:[jdp::JDParts :*:[jdp::JDParts
:*:[jdsm::John Deere Software Manager
:*:[macrep::Machine Reports
:*:[mjd::MyJohnDeere :*:[mjd::MyJohnDeere
:*:[opsc::Einsatzzentrale :*:[muc::Master Unlock Code
:*:[seccon::Teilbreitensteuerung
:*:[gs::GreenStar
:*:[cc::CommandCenter
:*:[fc::Field Connect
:*:[rs::RowSense
:*:[sub::Abonnement
:*:[ss::Stellar Support
:*:[tman::Technische Betriebsanleitung
:*:[oman::Betriebsanleitung :*:[oman::Betriebsanleitung
:*:[hl3::HarvestLab 3000 :*:[opsc::Einsatzzentrale
:*:[hlo::Originales HarvestLab :*:[rs::RowSense
:*:[bin::Virtuellen Bestand :*:[seccon::Teilbreitensteuerung
:*:[warrep::Warranty Reports :*:[serva::Service Advisor
:*:[sf::StarFire
:*:[ss::Stellar Support
:*:[sub::Abonnement
:*:[tcsm::Technischer Bezirksleiter
:*:[tman::Technische Betriebsanleitung
:*:[tp::TouchPoint :*:[tp::TouchPoint
:*:[warrep::Warranty Reports
:*:[tcsm::Technischer Bezirksleiter :*:[tcsm::Technischer Bezirksleiter
:*:[jdsm::John Deere Software Manager :*:[jdsm::John Deere Software Manager
:*:[jddm::John Deere Data Manager :*:[jddm::John Deere Data Manager
@@ -467,54 +332,76 @@ Return
:*:[muc::Master Unlock Code :*:[muc::Master Unlock Code
:*:[asmn::Asset Manager :*:[asmn::Asset Manager
:*:[bsm::Base Station Manager :*:[bsm::Base Station Manager
#If :*:[lm::License Manager
:*:[sns::See & Spray
:*:[s4::SF-RTK
:*:[ls::Lizenz
:*:[agt::AgTech Code
#HotIf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; QoL Improvements ; QoL Improvements
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
:*:]me:: :*:]me::
Send, % Format("{:U}", A_UserName)
Return
:*:[me:: :*:[me::
Send, % Format("{:U}", A_UserName) {
Return Send StrUpper(A_UserName)
}
#If !(email = "[email protected]")
:*:@me::
Send, %email%
Return
#If
#j:: ; Open the downloads folder on Win+J #HotIf !(settings["Email"] = "[email protected]")
Run, C:\Users\%A_UserName%\Downloads :*:@em::
Return {
SendInput(settings["Email"])
}
#HotIf
; Open the downloads folder on Win+J
#j::Run("C:\Users\" A_UserName "\Downloads")
:*:[now:: :*:[now::
:*:]now:: :*:]now::
SendInput, % GetDateTime("ISO8601") ; Send the current time/date in ISO8601 format {
Return SendInput(FormatTime(A_NowUTC, "yyyy-MM-dd") "T" FormatTime(A_NowUTC, "H:mm'Z'")) ; Send the current time & date in ISO8601 format
}
; Send the current date in ISO8601 format
:*:[today:: :*:[today::
:*:]today:: :*:]today::
SendInput, % GetDateTime("date") ; Send the current date in ISO8601 format {
Return
SendInput(FormatTime(A_NowUTC, "yyyy-MM-dd"))
}
:*:[deg::{ASC 248} :*:[deg::{ASC 248}
:*:]deg::{ASC 248} :*:]deg::{ASC 248}
:*:[eq::{ASC 247} :*:[eq::{ASC 247}
:*:]eq::{ASC 247} :*:]eq::{ASC 247}
:*:[shrug::¯\_()_/¯
:*:]shrug::¯\_()_/¯
:*:[ltd::License to Deere :*:[shrug::
:*:]ltd::License to Deere :*:]shrug::
{
SendInput("¯\_(ツ)_/¯ ") ; Somehow the space at the end is very important
}
:*:[pwd::
:*:]pwd::
{
Send "{AppsKey}"
Sleep(100)
Send "{Up}"
Sleep(50)
Send "{Enter}"
Sleep(50)
Send "{Enter}"
Sleep(100)
Send "{Enter}"
Sleep(750)
Send "{Enter}"
}
docs: F19::Reload
run https://www.autohotkey.com/docs/AutoHotkey.htm
Return
F19:: Run D3K.ahk
-33
View File
@@ -1,33 +0,0 @@
#SingleInstance force ; Only one instance at a time
SendMode, Input
FileEncoding, UTF-8 ; Makes sure the special characters don't break stuff
Menu, Tray, Icon, %A_MyDocuments%\D3K\icons\manual.ico
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Edit, x2 y3 w78 h20 vNumber +Left,
Gui, Add, Button, x22 y43 w70 h20 Default vHidden, Ok
Gui, Add, Button, x81 y3 w17 h20 gHelp +Center, ?
Gui, Show, h28 w100, ManSol
GuiControl, Hide, Hidden
Return
ButtonOk:
Gui, submit ; I have no idea what the regex means any more...
If RegExMatch(Number, "[[:alpha:]]+")
run, % "http://serviceadvisor.deere.com/WebSA/manuals/" . Number
Else If RegExMatch(Number, "[[:digit:]]+")
run, % "https://serviceadvisor.deere.com/WebSA/solutions/en/" . Number
ExitApp
Return
Help:
MsgBox, 262176, Maual & Solution opener, Input the TM/OM SKU (easily ofund on TechPubs) or the DTAC solution number to open it in your default browser.`nTMs & OMs open in Service Advisor.
Return
GuiClose:
GuiEscape:
ExitApp
+59 -90
View File
@@ -1,123 +1,92 @@
#Include, func.ahk #Include "func.ahk"
#NoTrayIcon
Menu, Tray, Icon, shell32.dll, 283
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Create GUI ; Create GUI
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
Gui, -MaximizeBox -MinimizeBox ; Remove the max+min buttons myGui := Gui()
myGui.Opt("-MaximizeBox -MinimizeBox") ; Remove the max+min buttons
Gui, Add, GroupBox, x8 y2 w193 h37, First Name myGui.Add("Edit", "w200 vEmail", settings["Email"]).OnEvent("LoseFocus", ProcessUserInput) ; settings["Email"]
Gui, Add, Edit, x12 y15 w185 h20 vformName gName, %name%
Gui, Add, GroupBox, x8 y40 w207 h37, Email Address myGui.Add("Text",, "Documentation file:") ; settings["DocFile"]
Gui, Add, Edit, x12 y53 w200 h20 vformEmail gEmail, %email% myGui.Add("Text",, settings["DocFile"])
myGui.Add("Button",, "Pick a different file").OnEvent("Click", DocSelect)
Gui, Add, GroupBox, x8 y83 w107 h130, Main myGui.Add("Text", "Section", "Text Replacement")
Gui, Add, CheckBox, x12 y95 w100 h30 vformMansol Checked%mansol% gMansol, ManSol myGui.Add("CheckBox", "vJDPN Checked" . settings["JDProductNames"], "JD Product Names").OnEvent("Click", ProcessUserInput)
Gui, Add, CheckBox, x12 y125 w100 h30 vformMJDPaste Checked%mjdpaste% gMJDPaste, MJDPaste myGui.Add("CheckBox", "vGloVar Checked" . settings["GloVar"], "Global Variables").OnEvent("Click", ProcessUserInput)
Gui, Add, CheckBox, x12 y155 w100 h30 vformCaseFormatter Checked%caseformatter% gCaseFormatter, Case Formatter myGui.Add("CheckBox", "vDE Checked" . settings["German"], "DE ([ as prefix)").OnEvent("Click", ProcessUserInput)
Gui, Add, CheckBox, x25 y178 w75 h30 vformCFmail Checked%cfmail% gCFmail, Email option
GuiControl, show%caseformatter%, formCFmail ; only shows the check box for emails if the Case Formatter box is checked
Gui, Add, GroupBox, x8 y215 w277 h50 vformDocFile, Documentation File
Gui, Add, Text, x15 y231 w260 h30 vformDocFile2 gDocFile, %docfile%
Gui, Add, GroupBox, x128 y83 w157 h75, Text Replacement switch settings["msmv"] {
Gui, Add, CheckBox, x132 y95 w150 h30 vformJdpn Checked%jdpn% gJdpn, JD Product Names case "always-running": ; run at refresh of d3k, currently running
Gui, Add, CheckBox, x132 y125 w150 h30 vformGlovar Checked%glovar% gGlovar, Global Variables msmv_check := 1
Gui, Add, CheckBox, x132 y155 w100 h30 vformGer Checked%ger% gGer, DE ([ as prefix) case "always-stopped": ; run at refresh, currently stopped
msmv_check := 1
case "no-running": ; don't run at refresh, currently running
msmv_check := 0
case "no-stopped": ; don't run at refresh, currently stopped
msmv_check := 0
default:
MsgBox("Unexpected value `"" settings["msmv"] "`" in D3Ksettings.ini")
Reload
}
Gui, Add, Link, x132 y190 w150 h26 gHelp, <a href="https://daviddaily.dev/david/d3k/wiki">Click here for help</a>`n%A_AhkVersion% myGui.Add("Checkbox", "vMsmv Checked" . msmv_check, "Mouse Mover: silently start on startup").OnEvent("Click", ProcessUserInput)
Gui, Show, h273 w295, D3K version %d3k_version% myGui.Add("Link",, "<a href=`"https://daviddaily.dev/david/d3k/wiki`">Click here for help</a>")
myGui.Add("Text",, "AHK Version: " . A_AhkVersion)
myGui.Add("Text",, "D3K version " . d3k_version)
myGui.Title := "D3K settings"
MyGui.OnEvent("Close", ProcessUserInput)
myGui.OnEvent("Escape", End)
myGui.Show("AutoSize")
Return Return
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Edit ini ; Edit ini
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
/* /*
Default ini, sections are in []: (0 is off, 1 is on) Default ini, sections are in []: (0 is off, 1 is on)
[USpec]
[email protected] [email protected]
Name=Firstname Name=Firstname
DocFile=Select File DocFile=Select File
[Main]
Mansol=1
MJDPaste=1
CaseFormatter=1
CFmail=0
[Replacement]
JDProductNames=1 JDProductNames=1
GloVar=0 GloVar=0
[Language]
German=0 German=0
*/ */
Name:
Gui, Submit, NoHide
ini_write(sett_ini, "Name", formName)
Return
Email: ProcessUserInput(*)
Gui, Submit, NoHide {
ini_write(sett_ini, "Email", formEmail) Saved := MyGui.Submit(0) ; Save the contents of named controls into an object.
Return ini_write(sett_ini, "Email", Saved.Email)
ini_write(sett_ini, "JDProductNames", Saved.JDPN)
ini_write(sett_ini, "GloVar", Saved.GloVar)
ini_write(sett_ini, "German", Saved.DE)
if (Saved.Msmv = 1)
{
ini_write(sett_ini, "msmv", "always-stopped")
} else {
ini_write(sett_ini, "msmv", "no-stopped")
}
}
DocFile: DocSelect(*)
Gui, Submit {
FileSelectFile, SelectedFile, 3, , Open a file, Text Documents (*.txt) oSaved := myGui.Submit()
SelectedFile := FileSelect(3,, "Open a file", "Text Documents (*.txt)")
if !(SelectedFile) if !(SelectedFile)
MsgBox, You have not selected a file, this will break some things. MsgBox("You have not selected a file, this will break some things.")
else else
ini_write(sett_ini, "DocFile", SelectedFile) ini_write(sett_ini, "DocFile", SelectedFile)
Run, Settings.ahk Run("Settings.ahk")
Return }
Mansol: End(*)
Gui, Submit, NoHide {
ini_write(sett_ini, "Mansol", formMansol) ProcessUserInput()
Return ExitApp
}
MJDPaste:
Gui, Submit, NoHide
ini_write(sett_ini, "MJDPaste", formMJDPaste)
Return
CaseFormatter:
Gui, Submit, NoHide
GuiControl, show%formCaseFormatter%, formCFmail ; only shows the check box for emails if the Case Formatter box is checked
GuiControl,, formCFmail, 0
ini_write(sett_ini, "CaseFormatter", formCaseFormatter)
ini_write(sett_ini, "CFmail", "0") ; if you're toggling this, its either on or off, doesn't hurt to set it here
Return
CFmail:
Gui, Submit, NoHide
ini_write(sett_ini, "CFmail", formCFmail)
Return
Jdpn:
Gui, Submit, NoHide
ini_write(sett_ini, "JDProductNames", formJdpn)
Return
Glovar:
Gui, Submit, NoHide
ini_write(sett_ini, "GloVar", formGlovar)
Return
Ger:
Gui, Submit, NoHide
ini_write(sett_ini, "German", formGer)
Return
Help:
Gui, Submit
Return
GuiClose:
GuiEscape:
Run D3K.ahk
ExitApp ; Closes the app when escape or the exit button is pressed
-33
View File
@@ -1,33 +0,0 @@
#Include, func.ahk
csv = %A_MyDocuments%\emails.csv ; Where the email CSV is
glovarini := A_MyDocuments "\GloVar.ini"
Xid := ini_get(glovarini, "Info", "xID")
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Text, x2 y2 w60 h17 +Center, xID
Gui, Add, Text, x65 y2 w120 h17 +Center, Email
Gui, Add, Text, x190 y2 w100 h17 +Center, Name
Gui, Add, Edit, x2 y17 w60 h20 vXid, %Xid%
Gui, Add, Edit, x65 y17 w120 h20 vEmail
Gui, Add, Edit, x190 y17 w100 h20 vName
Gui, Add, Button, x172 y89 w70 h30 Default, OK
Gui, Show, h39 w292, Add dealer to CSV
Return
ButtonOK:
Gui, Submit
writethis := Xid . "," . Email . "," . Name
FileAppend, % "`n" writethis, %csv%
ini_write(A_MyDocuments "\GloVar.ini", "dem", Email)
Return
GuiEscape:
GuiClose:
ExitApp
-4
View File
@@ -1,4 +0,0 @@
xID,Email,Name,Demo Username,Dealer Org
X1,[email protected],Person 1,User 1,554866
X2,[email protected],Person 2,User 2,69983
X3,[email protected],Person 3,,4832
1 xID Email Name Demo Username Dealer Org
2 X1 [email protected] Person 1 User 1 554866
3 X2 [email protected] Person 2 User 2 69983
4 X3 [email protected] Person 3 4832
+58 -126
View File
@@ -1,62 +1,11 @@
#SingleInstance force ; Only one instance at a time #Requires AutoHotkey v2 ; v2 only
SendMode, Input #SingleInstance force ; Only one instance at a time
FileEncoding, UTF-8 ; Makes sure the special characters dont break stuff FileEncoding("UTF-8") ; Makes sure the special characters dont break stuff
SetWorkingDir, %A_MyDocuments%\D3K ; Make sure we can find the .ahks linked below SetWorkingDir(A_MyDocuments "\D3K") ; Make sure we can find the .ahks linked below
SetTitleMatchMode, 2 SetTitleMatchMode(2)
d3k_version := 3 ; The current version global d3k_version := 3 ; The current version
GetDateTime(lang)
{
FormatStr := "yyyy-MM-dd" ; The Date
FormatTime, DateStr, %A_NowUTC%, %FormatStr% ; format it to make it look like the Date we want
FormatStr := "H:mm'Z'" ; The time
FormatTime, TimeStr, %A_NowUTC%, %FormatStr% ; Format the string to be better
if (lang = "en")
{
Return DateStr " at " TimeStr
}
if (lang = "de")
{
Return DateStr " um " TimeStr
}
if (lang = "ISO8601")
{
Return DateStr "T" TimeStr
}
if (lang = "date")
{
Return DateStr
}
}
GetInfo(xID)
{
if (xID)
{
File := FileOpen(A_MyDocuments "\emails.csv", "r")
Loop
{
Line := File.ReadLine()
Array := StrSplit(Line,",") ; split the line at its separating commas to get separate "columns" AKA elements
if InStr(Array[1], xID) ; if at the specified element (1) the specified content (dealers xID) has been found
{
Test := {xid: Array[1], email: Array[2], name: Array[3], user: Array[4], org: Array[5]} ; Return the array so we can do {variable}.email and so on
File.Close() ; Close the file
Return Test ; Return the array with the deets that we found
}
} Until (File.AtEOF)
File.Close()
Return false
}
if !(xID)
{
Return false
}
}
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; INI Manipulation that supports UTF-8 ; INI Manipulation that supports UTF-8
@@ -64,50 +13,52 @@ GetInfo(xID)
ini_load(location) ini_load(location)
{ {
out := {} temp := FileOpen(location, "r")
File := FileOpen(location, "r") cleaner := temp.Read()
cleaner := File.Read() temp.Close()
File.Close() cleaner := RegExReplace(cleaner, "`m)[ \t]+$|^[\s\R]*$") ; Remove empty lines, spaces, tabs
cleaner := RegExReplace(cleaner, "`am)^[\s\R]*") ; Remove empty lines temp := FileOpen(location, "w")
cleaner := RegExReplace(cleaner, "m)[ \t]+$") ; Get rid of extra space at the end of values (NEEDS FIXED) temp.Write(cleaner)
File := FileOpen(location, "w") temp.Close()
File.Write(cleaner) temp := FileOpen(location, "r")
File.Close() out := Map() ; I tried an object, it was too complicated for what I'm doing. Nested map is good enough
File := FileOpen(location, "r") curr_section := 0 ; v2 won't evaluate a true/false to false if a variable isn't set to false
r := Object() ; bruh why do I have to set up variables now suddenly
Loop Loop
{ {
Line := File.ReadLine() Line := temp.ReadLine()
RegExMatch(Line, "(?<Section>(?<=\[).*(?=\]))|(?<Key>.*)=(?<Value>.*)", r) ; Key = rKey, Value = rValue, Section = rSection if (Line){
If (rSection) RegExMatch(Line, "(?<Section>(?<=\[).*(?=\]))|(?<Key>.*)=(?<Value>.*)", &r) ; Key = r.Key, Value = r.Value, Section = r.Section
{ If (r.Section)
rSection := Trim(rSection, " `t`r`n") ; Remove pesky newlines and extra space {
rSection := StrReplace(rSection, " ", "§") ; AHK can't handle spaces in nested array names, so they're substituted with § out[r.Section] := Map()
out[rSection]:={} curr_section := r.Section
c_Section := rSection } Else
} Else {
{ If (curr_section)
rKey := Trim(rKey, " `t`r`n") {
rValue := Trim(rValue, " `t`r`n") out[curr_section].Set(Trim(r.Key, " `t`r`n"), Trim(r.Value, " `t`r`n"))
out[c_Section, rKey] := rValue } Else
{
out.Set(Trim(r.Key, " `t`r`n"), Trim(r.Value, " `t`r`n")) ; this handles things with no section
}
}
} }
} Until (File.AtEOF) } Until (temp.AtEOF)
File.Close() temp.Close()
Return out Return out
} }
ini_write(location, inKey, inValue) ; Don't need to specify section because you can only have one hotstring anyway ini_write(location, inKey, inValue) ; Don't need to specify section because you can only have one hotstring anyway
{ {
Critical, On ini := FileOpen(location, "r")
file := FileOpen(location, "r") temp := ini.Read()
temp := file.Read() ini.Close()
file.Close() temp := RegExReplace(temp, "(?<=" inKey "=).*", inValue)
inKey := "(?<=" inKey "=)\S*" ; Regex to make sure we're matching only the value for the requested key ini := FileOpen(location, "w")
temp := RegExReplace(temp, inKey, inValue) ini.Write(temp)
; msgbox, % temp "`n`nRegex:`t" inKey "`nReplacing match with:`t" inValue ini.Close()
file := FileOpen(location, "w")
file.Write(temp)
file.Close()
} }
@@ -118,52 +69,33 @@ sett_ini := A_MyDocuments "\D3Ksettings.ini" ; Where the settings ini is
If !FileExist(sett_ini) ; Check if the sett_ini doesn't exist If !FileExist(sett_ini) ; Check if the sett_ini doesn't exist
{ {
file := FileOpen(sett_ini, "w") ini := FileOpen(sett_ini, "w")
writethis := " writethis := "
( LTrim ( LTrim
[USpec]
Email=LastnameFirstname@JohnDeere.com Email=LastnameFirstname@JohnDeere.com
Name=Firstname DocFile=0
DocFile=Select File
[Main]
Mansol=1
MJDPaste=1
CaseFormatter=1
CFmail=0
[Replacement]
JDProductNames=1 JDProductNames=1
GloVar=0 GloVar=0
[Language]
German=0 German=0
msmv=always
msmv_status=stopped
)" )"
file.Write(writethis) ini.Write(writethis)
file.Close() ini.Close()
Run Settings.ahk ; Runs the GUI for changing the settings, accessible with Alt+Shift+\ (also easy way to restart this script) Run("Settings.ahk") ; Runs the GUI for changing the settings, accessible with Alt+Shift+\ (also easy way to restart this script)
} }
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Read the sett_ini ; Read the sett_ini
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; This is the part that reads the file to see what your settings are. Variables in the sett_ini file are in all CamelCase, variables here are lowercase for more distinction ; This is the part that reads the file to see what your settings are.
settings := {} global settings := ini_load(sett_ini)
settings := ini_load(sett_ini)
; started as global variables, keeping this commented out in case there's some old script where I need to replace something
; User Specific things: ; User Specific things:
email := settings["USpec", "Email"] ;global email := settings["Email"]
name := settings["USpec", "Name"] ;global docfile := settings["DocFile"]
docfile := settings["USpec", "DocFile"] ;global jdpn := settings["JDProductNames"]
;global glovar := settings["GloVar"]
; General Settings ;global ger := settings["German"]
mansol := settings["Main", "Mansol"]
supadmin := settings["Main", "Supadmin"]
mjdpaste := settings["Main", "MJDPaste"]
caseformatter := settings["Main", "CaseFormatter"]
cfmail := settings["Main", "CFmail"]
; Replacement
jdpn := settings["Replacement", "JDProductNames"]
glovar := settings["Replacement", "GloVar"]
; Language
ger := settings["Language", "German"]
+3 -1
View File
@@ -1,6 +1,8 @@
[Serial Numbers] [Serial Numbers]
1= 1=
cm=
v= v=
cm=
do=
co=
[Info] [Info]
case= case=
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

+75 -46
View File
@@ -1,63 +1,92 @@
#SingleInstance, force #Requires AutoHotkey v2 ; v2 only
CoordMode, Mouse, Screen #SingleInstance force
CoordMode("Mouse", "Screen")
waittime := 120000 waittime := 10000
Switch A_Args[1] for i in A_Args
{ {
Case "on": if (i = "on")
Menu, Tray, NoIcon {
Goto, Start A_IconHidden := 1
Case "off": Start(1,2,3)
ExitApp }
else if (i = "off")
{
ExitApp()
}
else
{
MsgBox (i)
}
} }
Menu, Tray, Add, Hide GUI, GuiToggle ; Adds a button to toggle the gui
Menu, Tray, Add, Exit, GuiClose ; Exit button
Menu, Tray, NoStandard ; None of the standard tray buttons
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Button, x3 y3 w55 h20 gStart +Center, Start
Gui, Add, Button, x3 y3 w55 h20 gStop +Center, Stop
Gui, Show, h28 w60, msmv
GuiControl, Hide, Stop ; Since we want the Start button to show first
Return
Start: A_TrayMenu.Delete() ; None of the standard tray buttons
GuiControl, Hide, Start A_TrayMenu.Add("Hide GUI", GuiToggle) ; Adds a button to toggle the gui
SetTimer, Msmv, %waittime% ; Checks if the has been input in the last 2 minutes every 30 secs, easier to stop a loop with SetTimer A_TrayMenu.Add("Exit", ExtMen) ; Exit button
GuiControl, Show, Stop
Return
Stop: myGui := Gui()
GuiControl, Hide, Stop myGui.Opt("+AlwaysOnTop +ToolWindow")
SetTimer, Msmv, off ButtonStart := myGui.Add("Button", "x3 y3 w55 h20 +Center", "Start")
GuiControl, Show, Start ButtonStart.OnEvent("Click", Start.Bind("Normal"))
Return ButtonStop := myGui.Add("Button", "x3 y3 w55 h20 +Center Hidden", "Stop")
ButtonStop.OnEvent("Click", Stop.Bind("Normal"))
myGui.Title := "msmv"
If (A_IconHidden = false)
{
myGui.Show("h28 w60")
}
Msmv:
If (A_TimeIdle > waittime) ; https://www.autohotkey.com/docs/Variables.htm#User_Idle_Time Start(A_GuiEvent, GuiCtrlObj, Info)
{
SetTimer(Msmv,waittime) ; Checks if the has been input in the last 2 minutes every 30 secs, easier to stop a loop with SetTimer
If (A_IconHidden = false)
{ {
Random, x,, %A_ScreenWidth% ButtonStart.Visible := false
Random, y,, %A_ScreenHeight% ButtonStop.Visible := true
MouseMove %x%, %y%
} }
Return }
GuiToggle: Stop(A_GuiEvent, GuiCtrlObj, Info)
If !nogui {
SetTimer(Msmv,0)
If (A_IconHidden = false)
{ {
Gui, Hide ButtonStop.Visible := false
Menu, Tray, Check, Hide GUI ButtonStart.Visible := true
nogui := True }
}
Msmv(*)
{
If (A_TimeIdle > waittime) ; https://www.autohotkey.com/docs/Variables.htm#User_Idle_Time
{
x := Random(, A_ScreenWidth)
y := Random(, A_ScreenHeight)
MouseMove(x, y)
}
}
GuiToggle(ItemName, ItemPos, MenuObj)
{
global
If (WinExist("msmv"))
{
myGui.Destroy()
MenuObj.Check(ItemName)
} }
Else Else
{ {
Menu, Tray, uncheck, Hide GUI MenuObj.Uncheck(ItemName)
nogui := False myGui.Restore()
Gui, Show
} }
Return Return
}
GuiClose: ; exit option from tray menu
GuiEscape: ExtMen(*)
ExitApp ; Closes the app when escape or the exit button is pressed {
ExitApp()
}
@@ -1,40 +0,0 @@
#SingleInstance force
; The exe this is compiled into has manual.ico set as its icon.
!+S::gui()
gui()
{
static Number
static Hidden
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, Edit, x2 y3 w78 h20 vNumber +Left,
Gui, Add, Button, x22 y43 w70 h20 Default vHidden, Ok
Gui, Add, Button, x81 y3 w17 h20 gHelp +Center, ?
Gui, Show, h28 w100, ManSol
GuiControl, Hide, Hidden
Return
ButtonOk:
Gui, submit ; I have no idea what the regex means any more...
If RegExMatch(Number, "[[:alpha:]]+")
run, % "http://serviceadvisor.deere.com/WebSA/manuals/" . Number
Else If RegExMatch(Number, "[[:digit:]]+")
run, % "https://ccms.deere.com/prweb/PRServletCustomAuth/ZDate_MgiNPn1ccL6O6pyBurDs0hjFQ8*/!STANDARD?pyActivity=SolutionsSnapStart&Action=showHarness&className=Deere-Int-Solr-Docs&Purpose=SolutionDescriptionNew&SolutionID=" . Number . "&Language=Default"
ExitApp
Return
Help:
Run, https://daviddaily.dev/david/d3k/wiki/ManSol
Return
GuiClose:
GuiEscape:
Gui, Destroy
Return
}
-6
View File
@@ -1,6 +0,0 @@
# Standalone ManSol Opener
This is a standalone version, the help guide can be found [here](https://daviddaily.dev/david/d3k/wiki/ManSol)
## [Download the executable here](https://files.daviddaily.dev/.d3k/ManSol%20Opener.exe)
I would recommend putting it in your startup folder (`%appdata%\Microsoft\Windows\Start Menu\Programs\Startup`) so that it starts automagically when you start your computer.