adding support for a different first name, because of that an improvement to the settings dialog was needed

This commit is contained in:
David Daily 2020-03-11 10:55:20 -05:00
parent bcfad04ecb
commit 5bbbbad247
2 changed files with 33 additions and 37 deletions

49
D3K.ahk
View File

@ -14,6 +14,7 @@ FileAppend,
[USpec] [USpec]
RACF=LF01234 RACF=LF01234
Email=LastnameFirstname@JohnDeere.com Email=LastnameFirstname@JohnDeere.com
Name=Firstname
DocFile=Select File DocFile=Select File
[Main] [Main]
Mansol=1 Mansol=1
@ -37,6 +38,7 @@ Run Settings.ahk ; Runs the GUI for changing the settings, also accessible with
; User Specific things: ; User Specific things:
racf := ini_get(ini, "USpec", "RACF") racf := ini_get(ini, "USpec", "RACF")
email := ini_get(ini, "USpec", "Email") email := ini_get(ini, "USpec", "Email")
name := ini_get(ini, "USpec", "Name")
docfile := ini_get(ini, "USpec", "DocFile") docfile := ini_get(ini, "USpec", "DocFile")
; General Settings ; General Settings
@ -421,47 +423,28 @@ SetTitleMatchMode, 2
; Regular ; Regular
:*:]email:: :*:]email::
Send Hello,{Enter 2} {Shift down}{Enter}{Shift up}Please contact us if you have any questions.{Up}{End} Send Hello,{Enter 2}{Space 3}
Return Return
; DTAC Problem ; Cases
:*:]97010::
Send Hello,{Enter 2} As this is a hardware/compatibility related inquiry, we here at the GSC cannot assist you properly. Please contact DTAC and they will be able to assist you further.
Return
; 2 Year old COMAR
:*:]2yc::
Send Hello,{Enter 2} You are unable to activate this product as the COMAR is over 2 years old. There is a form in the Dealer Corner that you can fill out to have it replaced as long as it falls within the criteria outlined in solution 108357.{Enter}Please contact your TCSM if you have any questions about this process.
Return
; CCMS
:*:]cms:: :*:]cms::
Send Hello,{Enter 2} {Enter}{Home down}{Shift up}{Home up}Please contact us if you have any questions.{Enter 2}Thank you,{Enter}David{Up 4}{End} Send Hello,{Enter 2}{Space 3}{Enter}{Home down}{Shift up}{Home up}{Enter}Thank you,{Enter}%name%{Up 3}{End}
Return Return
#If #If
; German ; German
#If, ger = "1" #If, ger = "1"
; Regular ; Regular
:*:[email:: :*:[email::
Send Hallo,{Enter 2} {Shift down}{Enter}{Shift up}Für Rückfragen stehen wir gerne zur Verfügung.{Up}{End} Send Hallo,{Enter 2}{Space 3}
Return Return
; DTAC Problem ; Case
:*:[97010::
Send Hallo,{Enter 2} Da dies eine Hardware/Kompatibilität-bezogene Anfrage ist, können wir hier im GSC leider ihre Frage nicht sehr gut beantworten. Bitte wenden Sie sich an DTAC, dort können Sie bessere unterstützung für diesen typ von fragen bekommen.
Return
; 2 Year old COMAR
:*:[2yc::
Send Hallo,{Enter 2} Sie können dieses Produkt nicht aktivieren weil die COMAR-Nummer über 2 Yahre alt ist. Es gibt in Vertriebspartnerinformation ein Formular das Sie ausfüllen können, und Ihre Aktivierungen werden ersetzt so lange es innerhalb der Regeln in DTAC Lösung 108357 ist.{Enter}Bitte melden Sie sich bei Ihrem Technischen Bezirksleiter wenn Sie Fragen über diesen Prozess haben.
Return
; CCMS case
:*:[cms:: :*:[cms::
Send Hallo,{Enter 2} {Enter}{Home down}{Shift up}{Home up}Für Rückfragen stehen wir gerne zur Verfügung.{Enter 2}Mit freundlichen Grüßen,{Enter}David{Up 4}{End} Send Hallo,{Enter 2}{Space 3}{Enter}{Home down}{Shift down}{Home up}{Shift up}{Enter}Mit freundlichen Grüßen,{Enter}%name%{Up 3}{End}
Return Return
#If #If
@ -561,7 +544,7 @@ SetTitleMatchMode, 2
:*:mtg::MTG :*:mtg::MTG
::wdt::WDT ::wdt::WDT
::itc::iTC ::itc::iTC
::vin::VIN :*:vin::VIN
::gs2::GS2 ::gs2::GS2
::gs3::GS3 ::gs3::GS3
::sf1::SF1 ::sf1::SF1
@ -621,19 +604,19 @@ SetTitleMatchMode, 2
; QoL Improvements ; QoL Improvements
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
#j:: #j:: ; Open the downloads folder on Win+J
Run, C:\Users\%racf%\Downloads ; Open the downloads folder on Win+J Run, C:\Users\%racf%\Downloads
Return Return
#w:: #w:: ; Open My Documents folder on Win+W
if WinActive("ahk_exe Explorer.EXE") ; If windows explorer is focused if WinActive("ahk_exe Explorer.EXE") ; If windows explorer is focused
{ {
Send !d ; Focus the address bar Send !d ; Focus the address bar
Send C:\Users\%racf%\Documents\Work_Docs\Cases\2020-01 - 06 ; current folder, would love to use a var instead, but Run doesn't like it Send C:\Users\%racf%\Documents
Send {Enter} Send {Enter}
Return Return
} }
Run, C:\Users\%racf%\Documents\Work_Docs\Cases\2020-01 - 06 ; Open the documentation folder on Win+W Run, C:\Users\%racf%\Documents
Return Return

View File

@ -11,6 +11,7 @@ This is the part that reads the file to see what your settings are. Variables in
; User Specific things: ; User Specific things:
racf := ini_get(ini, "USpec", "RACF") racf := ini_get(ini, "USpec", "RACF")
email := ini_get(ini, "USpec", "Email") email := ini_get(ini, "USpec", "Email")
name := ini_get(ini, "USpec", "Name")
docfile := ini_get(ini, "USpec", "DocFile") docfile := ini_get(ini, "USpec", "DocFile")
; General Settings ; General Settings
@ -34,18 +35,22 @@ Gui, -MaximizeBox -MinimizeBox ; Remove the max+min buttons
Gui, Add, GroupBox, x8 y2 w67 h37, RACF Gui, Add, GroupBox, x8 y2 w67 h37, RACF
Gui, Add, Edit, x12 y15 w60 h20 vformRACF gRACF, %RACF% Gui, Add, Edit, x12 y15 w60 h20 vformRACF gRACF, %RACF%
Gui, Add, GroupBox, x85 y2 w200 h37, First Name
Gui, Add, Edit, x89 y15 w193 h20 vformName gName, %Name%
Gui, Add, GroupBox, x8 y40 w207 h37, Email Address Gui, Add, GroupBox, x8 y40 w207 h37, Email Address
Gui, Add, Edit, x12 y53 w200 h20 vformEmail gEmail, %Email% Gui, Add, Edit, x12 y53 w200 h20 vformEmail gEmail, %Email%
Gui, Add, GroupBox, x77 y2 w207 h37, Documentation File
Gui, Add, Text, x81 y19 w200 h20 gDocFile, %docfile%
Gui, Add, GroupBox, x8 y83 w107 h130, Main Gui, Add, GroupBox, x8 y83 w107 h130, Main
Gui, Add, CheckBox, x12 y95 w100 h30 vformMansol Checked%mansol% gMansol, ManSol Gui, Add, CheckBox, x12 y95 w100 h30 vformMansol Checked%mansol% gMansol, ManSol
Gui, Add, CheckBox, x12 y125 w100 h30 vformMJDPaste Checked%mjdpaste% gMJDPaste, MJDPaste Gui, Add, CheckBox, x12 y125 w100 h30 vformMJDPaste Checked%mjdpaste% gMJDPaste, MJDPaste
Gui, Add, CheckBox, x12 y155 w100 h30 vformCaseFormatter Checked%caseformatter% gCaseFormatter, Case Formatter Gui, Add, CheckBox, x12 y155 w100 h30 vformCaseFormatter Checked%caseformatter% gCaseFormatter, Case Formatter
Gui, Add, CheckBox, x25 y178 w75 h30 vformCFmail Checked%cfmail% gCFmail, Email option 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 GuiControl, show%caseformatter%, formCFmail ; only shows the check box for emails if the Case Formatter box is checked
Gui, Add, GroupBox, x8 y215 w277 h40 vformDocFile, Documentation File
Gui, Add, Text, x15 y231 w260 h20 vformDocFile2 gDocFile, %docfile%
GuiControl, show%caseformatter%, formDocFile ; only shows the documentation file field if the Case Formatter box is checked
GuiControl, show%caseformatter%, formDocFile2
Gui, Add, GroupBox, x128 y83 w157 h75, Text Replacement Gui, Add, GroupBox, x128 y83 w157 h75, Text Replacement
Gui, Add, CheckBox, x132 y95 w150 h30 vformJdpn Checked%jdpn% gJdpn, JD Product Names Gui, Add, CheckBox, x132 y95 w150 h30 vformJdpn Checked%jdpn% gJdpn, JD Product Names
@ -54,7 +59,7 @@ Gui, Add, CheckBox, x132 y155 w100 h30 vformGer Checked%ger% gGer, DE ([ as pref
Gui, Add, Link, x132 y190 w150 h23 gHelp, <a href="https://daviddaily.dev/david/d3k/wiki">Click here for help</a> (v%d3k_version%) Gui, Add, Link, x132 y190 w150 h23 gHelp, <a href="https://daviddaily.dev/david/d3k/wiki">Click here for help</a> (v%d3k_version%)
Gui, Show, h225 w295, David 3000 Settings Gui, Show, h263 w295, David 3000 Settings
Return Return
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -65,6 +70,7 @@ Default ini, sections are in []: (0 is off, 1 is on)
[USpec] [USpec]
RACF=LF01234 RACF=LF01234
Email=LastnameFirstname@JohnDeere.com Email=LastnameFirstname@JohnDeere.com
Name=Firstname
DocFile=Select File DocFile=Select File
[Main] [Main]
Mansol=1 Mansol=1
@ -88,6 +94,11 @@ RACF:
ini_write(ini, "RACF", formRACF) ini_write(ini, "RACF", formRACF)
Return Return
Name:
Gui, Submit, NoHide
ini_write(ini, "Name", formName)
Return
Email: Email:
Gui, Submit, NoHide Gui, Submit, NoHide
ini_write(ini, "Email", formEmail) ini_write(ini, "Email", formEmail)
@ -117,6 +128,8 @@ Return
CaseFormatter: CaseFormatter:
Gui, Submit, NoHide Gui, Submit, NoHide
GuiControl, show%formCaseFormatter%, formCFmail ; only shows the check box for emails if the Case Formatter box is checked GuiControl, show%formCaseFormatter%, formCFmail ; only shows the check box for emails if the Case Formatter box is checked
GuiControl, show%formCaseFormatter%, formDocFile
GuiControl, show%formCaseFormatter%, formDocFile2
GuiControl,, formCFmail, 0 GuiControl,, formCFmail, 0
ini_write(ini, "CaseFormatter", formCaseFormatter) ini_write(ini, "CaseFormatter", formCaseFormatter)
ini_write(ini, "CFmail", "0") ; if you're toggling this, its either on or off, doesn't hurt to set it here ini_write(ini, "CFmail", "0") ; if you're toggling this, its either on or off, doesn't hurt to set it here