Update 'func.ahk'
This commit is contained in:
parent
67dd119939
commit
e6bd22263e
24
func.ahk
24
func.ahk
@ -30,14 +30,24 @@ GetInfo(xID) ; Accept what is passed here as the variable "xID" in the script
|
||||
if (xID)
|
||||
{
|
||||
csv := FileOpen(A_MyDocuments "\Work_Docs\emails.csv", "r")
|
||||
Loop {
|
||||
if RegExMatch(csv.Read, xID)
|
||||
{
|
||||
Loop {
|
||||
ReadLine := csv.ReadLine()
|
||||
Array := StrSplit(ReadLine,",")
|
||||
} Until InStr(Array[1], xID)
|
||||
csv.Close()
|
||||
Test := {xid: Array[1], email: Array[2], name: Array[3], user: Array[4], org: Array[5]} ; Return the array so we can do {variable}.email and so on
|
||||
Return Test
|
||||
} Else Return false
|
||||
} Until InStr(Array[1], xID)
|
||||
csv.Close()
|
||||
Test := {xid: Array[1], email: Array[2], name: Array[3], user: Array[4], org: Array[5]} ; Return the array so we can do {variable}.email and so on
|
||||
Return Test
|
||||
} Else
|
||||
{
|
||||
Return Test.xid := "0"
|
||||
}
|
||||
}
|
||||
if !(xID)
|
||||
{
|
||||
Return Test.xid := "0"
|
||||
}
|
||||
}
|
||||
|
||||
SetInfo(xID, column, value)
|
||||
@ -68,7 +78,7 @@ SetInfo(xID, column, value)
|
||||
{
|
||||
tempcsv .= Dealinfo[k].xid . "," . Dealinfo[k].email . "," . Dealinfo[k].name . "," . Dealinfo[k].user . "," . Dealinfo[k].org
|
||||
}
|
||||
csv := A_MyDocuments . "\Work_Docs\emails-test.csv"
|
||||
csv := A_MyDocuments . "\Work_Docs\emails.csv"
|
||||
FileAppend, %tempcsv%, tempcsv
|
||||
FileCopy, tempcsv, %csv%, 1
|
||||
FileDelete, tempcsv
|
||||
|
Loading…
Reference in New Issue
Block a user