Update 'Case_Formatter.ahk'
This commit is contained in:
parent
e141f09b67
commit
f052b59e5a
@ -1,172 +1,170 @@
|
|||||||
#Include, func.ahk
|
#Include, func.ahk
|
||||||
|
|
||||||
SetTitleMatchMode, 2
|
SetTitleMatchMode, 2
|
||||||
|
|
||||||
ini = %A_MyDocuments%\D3Ksettings.ini
|
ini = %A_MyDocuments%\D3Ksettings.ini
|
||||||
|
|
||||||
; 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
|
; 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,+AlwaysOnTop
|
||||||
Gui, +ToolWindow
|
Gui, +ToolWindow
|
||||||
|
|
||||||
IniRead, docfile, %ini%, USpec, DocFile, 0
|
IniRead, docfile, %ini%, USpec, DocFile, 0
|
||||||
|
|
||||||
CurrTimeEN := GetDateTime("en")
|
CurrTimeEN := GetDateTime("en")
|
||||||
CurrTimeDE := GetDateTime("de")
|
CurrTimeDE := GetDateTime("de")
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; GUI creation
|
; 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"
|
; 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, 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 vContact Checked, E-&Mail ; Second group of Radio buttons
|
||||||
Gui, Add, Radio, x82 y23 w60 h20, &Call
|
Gui, Add, Radio, x82 y23 w60 h20, &Call
|
||||||
|
|
||||||
|
|
||||||
Gui, Add, Radio, x142 y3 w80 h20 Group vAct, &Warrant
|
Gui, Add, Radio, x142 y3 w80 h20 Group vAct, &Warrant
|
||||||
Gui, Add, Radio, x142 y23 w80 h20 , &Demo
|
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
|
Gui, Show, h70 w210, Contact
|
||||||
;GuiControl, Hide, Hidden ; Hide the button to be hidden
|
;GuiControl, Hide, Hidden ; Hide the button to be hidden
|
||||||
Return
|
Return
|
||||||
|
|
||||||
Time:
|
Time:
|
||||||
Run, addemail.ahk
|
Run, addemail.ahk
|
||||||
|
|
||||||
GuiClose:
|
GuiClose:
|
||||||
GuiEscape:
|
GuiEscape:
|
||||||
ExitApp
|
ExitApp
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Buttons
|
; Buttons
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
ButtonGo:
|
ButtonGo:
|
||||||
Gui, submit
|
Gui, submit
|
||||||
Goto, Write
|
Goto, Write
|
||||||
Return
|
Return
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Contact
|
Contact
|
||||||
Mail: 1
|
Mail: 1
|
||||||
Call: 2
|
Call: 2
|
||||||
|
|
||||||
Lang
|
Lang
|
||||||
English: 1
|
English: 1
|
||||||
German: 2
|
German: 2
|
||||||
|
|
||||||
Act
|
Act
|
||||||
Warrant: 1
|
Warrant: 1
|
||||||
Demo: 2
|
Demo: 2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Write:
|
Write:
|
||||||
{
|
{
|
||||||
FileRead, NewLine, %docfile% ; Read the documentation file
|
FileRead, NewLine, %docfile% ; Read the documentation file
|
||||||
If (NewLine != "") ; If there is something in the file, this would return a string
|
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
|
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
|
NewLine := "" ; Free up Memory cause this could be quite a bit of stuff
|
||||||
|
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Email
|
; Email
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
If (Contact = "1")
|
If (Contact = "1")
|
||||||
{
|
{
|
||||||
If (Lang = "1") ; English
|
If (Lang = "1") ; English
|
||||||
{
|
{
|
||||||
If (Act = "0") ; Not an activation
|
If (Act = "0") ; Not an activation
|
||||||
{
|
{
|
||||||
FileAppend,Dealer emailed: "", %docfile%
|
FileAppend,Dealer emailed: "", %docfile%
|
||||||
}
|
}
|
||||||
|
|
||||||
If (Act = "1") ; Warrant
|
If (Act = "1") ; Warrant
|
||||||
{
|
{
|
||||||
FileAppend,Dealer emailed for warrant transfer: ""`n`nOld SN: `nNew SN: `nChallenge Code: `n`n, %docfile%
|
FileAppend,Dealer emailed for warrant transfer: ""`n`nOld SN: `nNew SN: `nChallenge Code: `n`n, %docfile%
|
||||||
}
|
}
|
||||||
|
|
||||||
If (Act = "2") ; Demo
|
If (Act = "2") ; Demo
|
||||||
{
|
{
|
||||||
FileAppend,Dealer emailed for `n`nSN: `nChallenge Code: `n`n, %docfile%
|
FileAppend,Dealer emailed for `n`nSN: `nChallenge Code: `n`n, %docfile%
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Else If (Lang = "2") ; German
|
Else If (Lang = "2") ; German
|
||||||
{
|
{
|
||||||
If (Act = "0") ; Not an activation
|
If (Act = "0") ; Not an activation
|
||||||
{
|
{
|
||||||
FileAppend,Händler emailte: "", %docfile%
|
FileAppend,Händler emailte: "", %docfile%
|
||||||
}
|
}
|
||||||
|
|
||||||
Else If (Act = "1") ; Warrant
|
Else If (Act = "1") ; Warrant
|
||||||
{
|
{
|
||||||
FileAppend,Händler emailte für Garantieübertragung`n`nAlte SN: `nNeue SN: `nAuthentisierungscode: `n`n, %docfile%
|
FileAppend,Händler emailte für Garantieübertragung`n`nAlte SN: `nNeue SN: `nAuthentisierungscode: `n`n, %docfile%
|
||||||
}
|
}
|
||||||
|
|
||||||
Else If (Act = "2") ; Demo
|
Else If (Act = "2") ; Demo
|
||||||
{
|
{
|
||||||
FileAppend,Händler emailte für `n`nSN: `nAuthentisierungscode: `n`n, %docfile%
|
FileAppend,Händler emailte für `n`nSN: `nAuthentisierungscode: `n`n, %docfile%
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Call
|
; Call
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
Else If (Contact = "2")
|
Else If (Contact = "2")
|
||||||
{
|
{
|
||||||
If (Lang = "1") ; English
|
If (Lang = "1") ; English
|
||||||
{
|
{
|
||||||
FileAppend, Call received %CurrTimeEN%.`n`n, %docfile%
|
FileAppend, Call received %CurrTimeEN%.`n`n, %docfile%
|
||||||
If (Act = "0") ; Not an activation
|
If (Act = "0") ; Not an activation
|
||||||
{
|
{
|
||||||
FileAppend,Dealer called for, %docfile%
|
FileAppend,Dealer called for, %docfile%
|
||||||
}
|
}
|
||||||
|
|
||||||
Else If (Act = "1") ; Warrant
|
Else If (Act = "1") ; Warrant
|
||||||
{
|
{
|
||||||
FileAppend,Dealer called for Warrant transfer`nOld SN: `nNew SN: `nChallenge Code: `n`n, %docfile%
|
FileAppend,Dealer called for Warrant transfer`nOld SN: `nNew SN: `nChallenge Code: `n`n, %docfile%
|
||||||
}
|
}
|
||||||
|
|
||||||
Else If (Act = "2") ; Demo
|
Else If (Act = "2") ; Demo
|
||||||
{
|
{
|
||||||
FileAppend,Dealer called for Demo`nSN: `nChallenge Code: `n`n, %docfile%
|
FileAppend,Dealer called for Demo`nSN: `nChallenge Code: `n`n, %docfile%
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Else If (Lang = "2") ; German
|
Else If (Lang = "2") ; German
|
||||||
{
|
{
|
||||||
FileAppend, Anruf wurde %CurrTimeDE% entgegengenommen.`n`n, %docfile%
|
FileAppend, Anruf wurde %CurrTimeDE% entgegengenommen.`n`n, %docfile%
|
||||||
|
|
||||||
If (Act = "0") ; Not an activation
|
If (Act = "0") ; Not an activation
|
||||||
{
|
{
|
||||||
FileAppend,Händler rief an mit, %docfile%
|
FileAppend,Händler rief an mit, %docfile%
|
||||||
}
|
}
|
||||||
|
|
||||||
Else If (Act = "1") ; Warrant
|
Else If (Act = "1") ; Warrant
|
||||||
{
|
{
|
||||||
FileAppend,Händler rief an für Garantieübertragung`nAlte SN: `nNeue SN: `nAuthentisierungscode: `n`n, %docfile%
|
FileAppend,Händler rief an für Garantieübertragung`nAlte SN: `nNeue SN: `nAuthentisierungscode: `n`n, %docfile%
|
||||||
}
|
}
|
||||||
|
|
||||||
Else If (Act = "2") ; Demo
|
Else If (Act = "2") ; Demo
|
||||||
{
|
{
|
||||||
FileAppend,Händler rief an für Demo`nSN: `nAuthentisierungscode: `n`n, %docfile%
|
FileAppend,Händler rief an für Demo`nSN: `nAuthentisierungscode: `n`n, %docfile%
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ExitApp
|
||||||
WinActivate, docfile.txt ; Switch to the txt file where the notes are being taken
|
|
||||||
ExitApp
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user