Add support for updating the dealer information
wrote a new function for this, check func.ahk: f6d0981b3b
This commit is contained in:
parent
f6d0981b3b
commit
c9fced6b6d
29
D3K.ahk
29
D3K.ahk
@ -132,8 +132,8 @@ If (glovar = 1)
|
|||||||
}
|
}
|
||||||
If InStr(REKey, "xid") ; If an xID is entered. Unique identifier for people
|
If InStr(REKey, "xid") ; If an xID is entered. Unique identifier for people
|
||||||
{
|
{
|
||||||
dealinfo := GetInfo(REValue) ; Gets information, see function for details
|
|
||||||
StringUpper, REValue, REValue ; Makes xID uppercase
|
StringUpper, REValue, REValue ; Makes xID uppercase
|
||||||
|
dealinfo := GetInfo(REValue) ; Gets information, see function for details
|
||||||
|
|
||||||
if !(REValue = dealinfo.xid)
|
if !(REValue = dealinfo.xid)
|
||||||
{
|
{
|
||||||
@ -152,17 +152,15 @@ If (glovar = 1)
|
|||||||
FileCopy, tempglovar, glovar.ahk,1
|
FileCopy, tempglovar, glovar.ahk,1
|
||||||
FileDelete, tempglovar
|
FileDelete, tempglovar
|
||||||
|
|
||||||
WinWaitNotActive, GloVar.ini
|
|
||||||
{
|
|
||||||
ini_writeValue(glovarini, "xID", REValue) ; Writes the xID entered, but uppercase
|
ini_writeValue(glovarini, "xID", REValue) ; Writes the xID entered, but uppercase
|
||||||
ini_writeValue(glovarini, "dem", dealinfo.email) ; Writes email address (incredibly useful)
|
ini_writeValue(glovarini, "dem", dealinfo.email) ; Writes email address (incredibly useful)
|
||||||
ini_writeValue(glovarini, "dnm", dealinfo.name) ; Writes Name (useful for when referring to that person)
|
ini_writeValue(glovarini, "dnm", dealinfo.name) ; Writes Name (useful for when referring to that person)
|
||||||
ini_writeValue(glovarini, "dus", dealinfo.user) ; Writes demo account name (somewhat useful)
|
ini_writeValue(glovarini, "dus", dealinfo.user) ; Writes demo account name (somewhat useful)
|
||||||
}
|
|
||||||
FileGetTime, gvMod, %glovarini% ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code
|
FileGetTime, gvMod, %glovarini% ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code
|
||||||
Continue
|
Continue
|
||||||
}
|
}
|
||||||
If (InStr(REKey, "dem") or InStr(REKey, "dnm") or InStr(REKey, "dus"))
|
If (InStr(REKey, "dem") or InStr(REKey, "dnm") or InStr(REKey, "dus") or InStr(REKey, "dorg"))
|
||||||
{
|
{
|
||||||
; Do not process xID related info, that is done above
|
; Do not process xID related info, that is done above
|
||||||
Continue
|
Continue
|
||||||
@ -193,6 +191,20 @@ If (glovar = 1)
|
|||||||
}
|
}
|
||||||
Break
|
Break
|
||||||
}
|
}
|
||||||
|
If InStr(RESection, "up")
|
||||||
|
{
|
||||||
|
new_email := ini_getValue(%glovarini%, "up", "dem")
|
||||||
|
new_name := ini_getValue(%glovarini%, "up", "dnm")
|
||||||
|
new_user := ini_getValue(%glovarini%, "up", "dus")
|
||||||
|
new_org := ini_getValue(%glovarini%, "up", "dorg")
|
||||||
|
xID := ini_getValue(%glovarini%, "up", "xID")
|
||||||
|
|
||||||
|
StringUpper, new_user, new_user
|
||||||
|
SetInfo(xID, "email", new_email)
|
||||||
|
SetInfo(xID, "name", new_name)
|
||||||
|
SetInfo(xID, "user", new_user)
|
||||||
|
SetInfo(xID, "org", new_org)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FileGetTime, gvMod, %glovarini% ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code
|
FileGetTime, gvMod, %glovarini% ; Make sure that this script knows what the ini was changed to so it doesn't constantly run through the above code
|
||||||
@ -625,9 +637,12 @@ Return
|
|||||||
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 %A_MyDocuments%\Work_Docs\Cases\2020-01 - 06 ; current folder
|
||||||
Send {Enter}
|
Send {Enter}
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
Run, C:\Users\%racf%\Documents\Work_Docs\Cases\2020-01 - 06 ; Open the documentation folder on Win+W
|
else
|
||||||
|
{
|
||||||
|
Run, %A_MyDocuments%\Work_Docs\Cases\2020-01 - 06 ; Open the documentation folder on Win+W
|
||||||
|
}
|
||||||
Return
|
Return
|
Loading…
Reference in New Issue
Block a user