​
I have tried passing arrays, into return \[x,y,z\]
I have tried sending data to a log file
I use a lot of comma delimination, so I dont know which is better. Loop, parse, or instringsplit, or loop read.
I would love to lay out like 3 situations and just get someone to critique/shit on/share advicce. Thanks.
Sending FSRemove(storedget) to another file, getting an array, writing to text file, retrieving and inserting variables into html/javacsript
Code: Select all
FSRemove(StoredGet)
html:=""
delimiter := ","
Loop, read, %LogGames%
{
if (A_LoopReadLine="")
continue
else
{
Cell := StrSplit(A_LoopReadLine,delimiter)
curgame := Cell[2]
html=
(
<option value="%curgame%" id="myH2" name="game">%curgame%</option>
%html%
)
}
}
file 2 receiving funcction call
Code: Select all
FSRemove(StoredGet)
{
Global
loopstore:=""
Loop, Read, %LogGames%
{
CurrentLine:=A_LoopReadLine
If InStr(CurrentLine,"")
continue
If InStr(CurrentLine,StoredGet)
{
LineRead := StrSplit(CurrentLine,delimiter)
GameUninstall:=LineRead[1]
john:=1
}
if (john!="1")
{
loopstore=
(
%CurrentLine%
%loopstore%
)
}
john:=0
}
/*
word_array := StrSplit(A_LoopReadLine, delimiter)
string:=word_array[1]
if instr(string,StoredGet)
continue
if (string="")
continue
else
{
loopstore=
(
%A_LoopReadLine%
%loopstore%
)
}
}
*/
Templog := A_ScriptDir "\loggame1.txt"
Filedelete, %Templog%
Fileappend, %loopstore%, %Templog%
Filemove, %Templog%, %LogGames%, 1
Filedelete, %GamesUpdate%
Filemove, %GameUninstall%, %GamesUpdate%, 1
}