1051
Modification Help / Re: Filewriting loopcheck and rewrite
« on: August 26, 2010, 11:54:32 PM »I think you can use thisThat doesn't really work for what i need, as:Code: [Select]function whatever(%input) //Input is the name of your variable you want changed
{
//fileobjectcreated
//fileobjectopenforwrite
//tolazytodoit
while(!%file.isEOF())
{
%line = %file.readLine();
if(getSubStr(%line,0,1) $= "$")
if(getSubStr(getWord(%line,0),0,strLen(getWord(%line,0))/2) $= strLen(%input)/2)
{
%file.writeLine(%changevariabletowhatever);
break;
}
}
}
I haven't tested it, but i hope the theory of this can help you, or if someone actually knows how to do it a more efficient way, correct me.
-What i REALLY needed, was how to rewrite just that line, even if it is midfile, with a new line.
EDIT : And now that i study the script more closely, wouldn't that make an infinite loop that crashes you? Because i see no incrementing command.