9 Commits
2.8 ... 2.10

7 changed files with 83 additions and 69 deletions

View File

@ -1,4 +1,4 @@
#Include, func.ahk
#Include, func.ahk
SetTitleMatchMode, 2
@ -6,7 +6,9 @@ SetTitleMatchMode, 2
Gui,+AlwaysOnTop
Gui, +ToolWindow
docfile := ini_getValue(ini, "USpec", "DocFile")
docfile := ini_get(ini, "USpec", "DocFile")
cfmail := ini_get(ini, "Main", "CFmail")
Contact := 2
CurrTimeEN := GetDateTime("en")
CurrTimeDE := GetDateTime("de")
@ -16,22 +18,24 @@ CurrTimeDE := GetDateTime("de")
;------------------------------------------------------------------------------
; 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, Text, x75 y46 w150 h20 gTime, %CurrTimeEN%
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 vContact Checked, E-&Mail ; Second group of Radio buttons
Gui, Add, Radio, x82 y23 w60 h20, &Call
Gui, Add, Radio, x142 y3 w80 h20 Group vAct, &Warrant
Gui, Add, Radio, x142 y23 w80 h20 , &Demo
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.
Gui, Show, h70 w210, Contact
;GuiControl, Hide, Hidden ; Hide the button to be hidden
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:
@ -165,4 +169,4 @@ Write:
}
ExitApp
}
}

56
D3K.ahk
View File

@ -1,4 +1,4 @@
#Include, func.ahk
#Include, func.ahk
Menu, Tray, Icon, shell32.dll, 283 ; Set the tray icon to a keyboard
@ -14,11 +14,13 @@ FileAppend,
[USpec]
RACF=LF01234
Email=LastnameFirstname@JohnDeere.com
Name=Firstname
DocFile=Select File
[Main]
Mansol=1
MJDPaste=1
CaseFormatter=1
CFmail=0
[Replacement]
JDProductNames=1
GloVar=0
@ -36,6 +38,7 @@ Run Settings.ahk ; Runs the GUI for changing the settings, also accessible with
; User Specific things:
racf := ini_get(ini, "USpec", "RACF")
email := ini_get(ini, "USpec", "Email")
name := ini_get(ini, "USpec", "Name")
docfile := ini_get(ini, "USpec", "DocFile")
; General Settings
@ -420,47 +423,28 @@ SetTitleMatchMode, 2
; Regular
:*:]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
; DTAC Problem
:*:]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
; Cases
:*:]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
#If
; German
#If, ger = "1"
; Regular
:*:[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
; DTAC Problem
:*:[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
; Case
:*:[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
#If
@ -530,7 +514,7 @@ SetTitleMatchMode, 2
:*:]sub::subscription
:*:]ss::Stellar Support
:*:]tman::Technical Manual
:*:]operm::Operator's Manual
:*:]oman::Operator's Manual
:*:]hl3::HarvestLab 3000
:*:]hlo::Original HarvestLab
:*:]bin::Virtual Inventory
@ -560,7 +544,7 @@ SetTitleMatchMode, 2
:*:mtg::MTG
::wdt::WDT
::itc::iTC
::vin::VIN
:*:vin::VIN
::gs2::GS2
::gs3::GS3
::sf1::SF1
@ -620,21 +604,19 @@ SetTitleMatchMode, 2
; QoL Improvements
;------------------------------------------------------------------------------
#j::
Run, C:\Users\%racf%\Downloads ; Open the downloads folder on Win+J
#j:: ; Open the downloads folder on Win+J
Run, C:\Users\%racf%\Downloads
Return
/*
This part only works for my folder structure
#w::
#w:: ; Open My Documents folder on Win+W
if WinActive("ahk_exe Explorer.EXE") ; If windows explorer is focused
{
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}
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
*/

View File

@ -11,12 +11,14 @@ This is the part that reads the file to see what your settings are. Variables in
; User Specific things:
racf := ini_get(ini, "USpec", "RACF")
email := ini_get(ini, "USpec", "Email")
name := ini_get(ini, "USpec", "Name")
docfile := ini_get(ini, "USpec", "DocFile")
; General Settings
mansol := ini_get(ini, "Main", "Mansol")
mjdpaste := ini_get(ini, "Main", "MJDPaste")
caseformatter := ini_get(ini, "Main", "CaseFormatter")
cfmail := ini_get(ini, "Main", "CFmail")
; Replacement
jdpn := ini_get(ini, "Replacement", "JDProductNames")
@ -33,41 +35,48 @@ Gui, -MaximizeBox -MinimizeBox ; Remove the max+min buttons
Gui, Add, GroupBox, x8 y2 w67 h37, 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, 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 h105, 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 y125 w100 h30 vformMJDPaste Checked%mjdpaste% gMJDPaste, MJDPaste
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
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, CheckBox, x132 y95 w150 h30 vformJdpn Checked%jdpn% gJdpn, JD Product Names
Gui, Add, CheckBox, x132 y125 w150 h30 vformGlovar Checked%glovar% gGlovar, Global Variables
Gui, Add, CheckBox, x132 y155 w100 h30 vformGer Checked%ger% gGer, DE ([ as prefix)
Gui, Add, CheckBox, x12 y187 w100 h30 vformGer Checked%ger% gGer, DE ([ as prefix)
Gui, Add, Button, x132 y190 w150 h23 gHelp, Click here for help (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
;------------------------------------------------------------------------------
; Edit ini
;------------------------------------------------------------------------------
/*
Default ini, sections are in []:
Default ini, sections are in []: (0 is off, 1 is on)
[USpec]
RACF=LF01234
Email=LastnameFirstname@JohnDeere.com
DocFile=
Name=Firstname
DocFile=Select File
[Main]
Mansol=1
MJDPaste=1
CaseFormatter=1
CFmail=0
[Replacement]
JDProductNames=1
GloVar=0
@ -75,10 +84,9 @@ GloVar=0
German=0
format for below:
Button G-label (executes when clicked):
Submit the gui so that it can change and don't hide it
write the state of the check box (a 0 for unchecked, 1 for checked), to the file at %ini%, section with this name, line with this name
Submit the gui so that it can change and don't hide it
write the state of the check box (a 0 for unchecked, 1 for checked), to the file at %ini%, section with this name, line with this name
*/
RACF:
@ -86,6 +94,11 @@ RACF:
ini_write(ini, "RACF", formRACF)
Return
Name:
Gui, Submit, NoHide
ini_write(ini, "Name", formName)
Return
Email:
Gui, Submit, NoHide
ini_write(ini, "Email", formEmail)
@ -114,9 +127,19 @@ Return
CaseFormatter:
Gui, Submit, NoHide
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
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
Return
CFmail:
Gui, Submit, NoHide
ini_write(ini, "CFmail", formCFmail)
Return
Jdpn:
Gui, Submit, NoHide
ini_write(ini, "JDProductNames", formJdpn)
@ -134,7 +157,6 @@ Return
Help:
Gui, Submit
Run, https://daviddaily.dev/david/d3k/wiki
Return
GuiClose:

View File

@ -3,7 +3,7 @@ SendMode, Input
FileEncoding, UTF-8 ; Makes sure the special characters dont break stuff
SetWorkingDir, %A_MyDocuments%\D3K ; Make sure we can find the .ahks linked below
d3k_version = 2.8 ; The current version
d3k_version = 2.9 ; The current version
ini = %A_MyDocuments%\D3Ksettings.ini ; Where the settings ini is
@ -108,4 +108,4 @@ ini_write(location, inKey, inValue)
FileAppend, %tempini%, tempini ; Append the fixed ini to a new file
FileCopy, tempini, %location%, 1 ; Copy the file over, overwriting existing contents
FileDelete, tempini ; Delete the fixed temporary ini
}
}

Binary file not shown.

View File

@ -30,11 +30,11 @@ Return
Help:
MsgBox, 262176, Manual & Solution opener, Press Alt+Shift+S to open the window.`nInput the TM/OM SKU (easily found on TechPubs) or the DTAC solution number to open it in your default browser.`nTMs & OMs open in Service Advisor.
Run, https://daviddaily.dev/david/d3k/wiki/ManSol
Return
GuiClose:
GuiEscape:
Gui, Destroy
Return
}
}

6
standalones/README.md Normal file
View File

@ -0,0 +1,6 @@
# 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.