Merge pull request '2.9 improvements' (#1) from dev into master
Reviewed-on: #1
This commit is contained in:
commit
5fa6935537
@ -1,4 +1,4 @@
|
|||||||
#Include, func.ahk
|
#Include, func.ahk
|
||||||
|
|
||||||
SetTitleMatchMode, 2
|
SetTitleMatchMode, 2
|
||||||
|
|
||||||
@ -6,7 +6,9 @@ SetTitleMatchMode, 2
|
|||||||
Gui,+AlwaysOnTop
|
Gui,+AlwaysOnTop
|
||||||
Gui, +ToolWindow
|
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")
|
CurrTimeEN := GetDateTime("en")
|
||||||
CurrTimeDE := GetDateTime("de")
|
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"
|
; 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 y3 w60 h20 Group vLang Checked, &English ; First group of Radio buttons
|
||||||
Gui, Add, Radio, x12 y23 w60 h20, &German
|
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 y3 w60 h20 Group vAct, &Warrant
|
||||||
Gui, Add, Radio, x82 y23 w60 h20, &Call
|
Gui, Add, Radio, x82 y23 w60 h20, &Demo
|
||||||
|
|
||||||
|
|
||||||
Gui, Add, Radio, x142 y3 w80 h20 Group vAct, &Warrant
|
|
||||||
Gui, Add, Radio, x142 y23 w80 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, 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
|
Return
|
||||||
|
|
||||||
Time:
|
Time:
|
||||||
@ -165,4 +169,4 @@ Write:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ExitApp
|
ExitApp
|
||||||
}
|
}
|
||||||
|
7
D3K.ahk
7
D3K.ahk
@ -1,4 +1,4 @@
|
|||||||
#Include, func.ahk
|
#Include, func.ahk
|
||||||
|
|
||||||
Menu, Tray, Icon, shell32.dll, 283 ; Set the tray icon to a keyboard
|
Menu, Tray, Icon, shell32.dll, 283 ; Set the tray icon to a keyboard
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ DocFile=Select File
|
|||||||
Mansol=1
|
Mansol=1
|
||||||
MJDPaste=1
|
MJDPaste=1
|
||||||
CaseFormatter=1
|
CaseFormatter=1
|
||||||
|
CFmail=0
|
||||||
[Replacement]
|
[Replacement]
|
||||||
JDProductNames=1
|
JDProductNames=1
|
||||||
GloVar=0
|
GloVar=0
|
||||||
@ -625,8 +626,7 @@ Run, C:\Users\%racf%\Downloads ; Open the downloads folder on Win+J
|
|||||||
Return
|
Return
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
This part only works for my folder structure
|
|
||||||
#w::
|
#w::
|
||||||
if WinActive("ahk_exe Explorer.EXE") ; If windows explorer is focused
|
if WinActive("ahk_exe Explorer.EXE") ; If windows explorer is focused
|
||||||
{
|
{
|
||||||
@ -637,4 +637,3 @@ if WinActive("ahk_exe Explorer.EXE") ; If windows explorer is focused
|
|||||||
}
|
}
|
||||||
Run, C:\Users\%racf%\Documents\Work_Docs\Cases\2020-01 - 06 ; Open the documentation folder on Win+W
|
Run, C:\Users\%racf%\Documents\Work_Docs\Cases\2020-01 - 06 ; Open the documentation folder on Win+W
|
||||||
Return
|
Return
|
||||||
*/
|
|
||||||
|
29
Settings.ahk
29
Settings.ahk
@ -17,6 +17,7 @@ docfile := ini_get(ini, "USpec", "DocFile")
|
|||||||
mansol := ini_get(ini, "Main", "Mansol")
|
mansol := ini_get(ini, "Main", "Mansol")
|
||||||
mjdpaste := ini_get(ini, "Main", "MJDPaste")
|
mjdpaste := ini_get(ini, "Main", "MJDPaste")
|
||||||
caseformatter := ini_get(ini, "Main", "CaseFormatter")
|
caseformatter := ini_get(ini, "Main", "CaseFormatter")
|
||||||
|
cfmail := ini_get(ini, "Main", "CFmail")
|
||||||
|
|
||||||
; Replacement
|
; Replacement
|
||||||
jdpn := ini_get(ini, "Replacement", "JDProductNames")
|
jdpn := ini_get(ini, "Replacement", "JDProductNames")
|
||||||
@ -39,17 +40,19 @@ Gui, Add, Edit, x12 y53 w200 h20 vformEmail gEmail, %Email%
|
|||||||
Gui, Add, GroupBox, x77 y2 w207 h37, Documentation File
|
Gui, Add, GroupBox, x77 y2 w207 h37, Documentation File
|
||||||
Gui, Add, Text, x81 y19 w200 h20 gDocFile, %docfile%
|
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 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
|
||||||
|
GuiControl, show%caseformatter%, formCFmail ; only shows the check box for emails if the Case Formatter box is checked
|
||||||
|
|
||||||
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
|
||||||
Gui, Add, CheckBox, x132 y125 w150 h30 vformGlovar Checked%glovar% gGlovar, Global Variables
|
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, Link, x132 y190 w150 h23 gHelp, <a href="https://daviddaily.dev/david/d3k/wiki">Click here for help</a> (v%d3k_version%)
|
||||||
Gui, Add, Button, x132 y190 w150 h23 gHelp, Click here for help (v%d3k_version%)
|
|
||||||
|
|
||||||
Gui, Show, h225 w295, David 3000 Settings
|
Gui, Show, h225 w295, David 3000 Settings
|
||||||
Return
|
Return
|
||||||
@ -58,16 +61,16 @@ Return
|
|||||||
; Edit ini
|
; Edit ini
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
/*
|
/*
|
||||||
Default ini, sections are in []:
|
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
|
||||||
DocFile=
|
DocFile=Select File
|
||||||
[Main]
|
[Main]
|
||||||
Mansol=1
|
Mansol=1
|
||||||
MJDPaste=1
|
MJDPaste=1
|
||||||
CaseFormatter=1
|
CaseFormatter=1
|
||||||
|
CFmail=0
|
||||||
[Replacement]
|
[Replacement]
|
||||||
JDProductNames=1
|
JDProductNames=1
|
||||||
GloVar=0
|
GloVar=0
|
||||||
@ -75,10 +78,9 @@ GloVar=0
|
|||||||
German=0
|
German=0
|
||||||
|
|
||||||
format for below:
|
format for below:
|
||||||
|
|
||||||
Button G-label (executes when clicked):
|
Button G-label (executes when clicked):
|
||||||
Submit the gui so that it can change and don't hide it
|
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
|
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:
|
RACF:
|
||||||
@ -114,9 +116,17 @@ 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,, 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
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
CFmail:
|
||||||
|
Gui, Submit, NoHide
|
||||||
|
ini_write(ini, "CFmail", formCFmail)
|
||||||
|
Return
|
||||||
|
|
||||||
Jdpn:
|
Jdpn:
|
||||||
Gui, Submit, NoHide
|
Gui, Submit, NoHide
|
||||||
ini_write(ini, "JDProductNames", formJdpn)
|
ini_write(ini, "JDProductNames", formJdpn)
|
||||||
@ -134,7 +144,6 @@ Return
|
|||||||
|
|
||||||
Help:
|
Help:
|
||||||
Gui, Submit
|
Gui, Submit
|
||||||
Run, https://daviddaily.dev/david/d3k/wiki
|
|
||||||
Return
|
Return
|
||||||
|
|
||||||
GuiClose:
|
GuiClose:
|
||||||
|
4
func.ahk
4
func.ahk
@ -3,7 +3,7 @@ SendMode, Input
|
|||||||
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
|
||||||
|
|
||||||
d3k_version = 2.8 ; The current version
|
d3k_version = 2.9 ; The current version
|
||||||
|
|
||||||
ini = %A_MyDocuments%\D3Ksettings.ini ; Where the settings ini is
|
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
|
FileAppend, %tempini%, tempini ; Append the fixed ini to a new file
|
||||||
FileCopy, tempini, %location%, 1 ; Copy the file over, overwriting existing contents
|
FileCopy, tempini, %location%, 1 ; Copy the file over, overwriting existing contents
|
||||||
FileDelete, tempini ; Delete the fixed temporary ini
|
FileDelete, tempini ; Delete the fixed temporary ini
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -30,11 +30,11 @@ Return
|
|||||||
|
|
||||||
|
|
||||||
Help:
|
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
|
Return
|
||||||
|
|
||||||
GuiClose:
|
GuiClose:
|
||||||
GuiEscape:
|
GuiEscape:
|
||||||
Gui, Destroy
|
Gui, Destroy
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user