Update 'func.ahk'
This commit is contained in:
parent
67dd119939
commit
e6bd22263e
14
func.ahk
14
func.ahk
@ -30,6 +30,8 @@ GetInfo(xID) ; Accept what is passed here as the variable "xID" in the script
|
|||||||
if (xID)
|
if (xID)
|
||||||
{
|
{
|
||||||
csv := FileOpen(A_MyDocuments "\Work_Docs\emails.csv", "r")
|
csv := FileOpen(A_MyDocuments "\Work_Docs\emails.csv", "r")
|
||||||
|
if RegExMatch(csv.Read, xID)
|
||||||
|
{
|
||||||
Loop {
|
Loop {
|
||||||
ReadLine := csv.ReadLine()
|
ReadLine := csv.ReadLine()
|
||||||
Array := StrSplit(ReadLine,",")
|
Array := StrSplit(ReadLine,",")
|
||||||
@ -37,7 +39,15 @@ GetInfo(xID) ; Accept what is passed here as the variable "xID" in the script
|
|||||||
csv.Close()
|
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
|
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
|
Return Test
|
||||||
} Else Return false
|
} Else
|
||||||
|
{
|
||||||
|
Return Test.xid := "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !(xID)
|
||||||
|
{
|
||||||
|
Return Test.xid := "0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetInfo(xID, column, value)
|
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
|
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
|
FileAppend, %tempcsv%, tempcsv
|
||||||
FileCopy, tempcsv, %csv%, 1
|
FileCopy, tempcsv, %csv%, 1
|
||||||
FileDelete, tempcsv
|
FileDelete, tempcsv
|
||||||
|
Loading…
Reference in New Issue
Block a user