Tec 3 Report post Posted April 24, 2009 I scan my network and write the result at ini file with Iniwrite. Example: IniWrite($sIni, $list[$i], "TAG", $strTag) IniWrite($sIni, $list[$i], "USER", $strUser) $list[$i] is Computer name like PC1 PC2 PC3 .... Every scan I update the file or add new computer. I need for better clear view a line breake between the Sections. If i add a @CRLF at last iniwrite, every scan i add a new line break. But i need only one line break between Sections. Dont now how i can manage that. Need a littel help pls Share this post Link to post Share on other sites
FinalVersion 0 Report post Posted April 24, 2009 I scan my network and write the result at ini file with Iniwrite. Example: IniWrite($sIni, $list[$i], "TAG", $strTag) IniWrite($sIni, $list[$i], "USER", $strUser)oÝ÷ ÛMú+-Ó~¢À¨z¹ÚébãÂÔð¶ Before every section add a @CRLF. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Share this post Link to post Share on other sites
Tec 3 Report post Posted April 24, 2009 thx for replay but If i add a @CRLF at last iniwrite, every scan i add a new line break. But i need only one line break between Sections. Dont now how i can manage that. Share this post Link to post Share on other sites
FinalVersion 0 Report post Posted April 24, 2009 (edited) thx for replay butAs i said in my post above, just add @CRLF before each "new" section. Edited April 24, 2009 by Godly [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Share this post Link to post Share on other sites
rudi 12 Report post Posted April 24, 2009 (edited) As i said in my post above, just add @CRLF after each "new" section. He also is updating sections, by that the double CRLF will become tripple, quadruple, ... He will need to add the space lines as before. Then "cleanup double space lines" in a 2nd step: $INI_handle=FileOpen("C:\test.ini",0) $Full_INI=FileRead($INI_handle) FileClose($INI_handle) $Fixed_INI=StringRegExpReplace($Full_INI,"(\r\n){2,}",@crlf & @crlf) $INI_handle=FileOpen("C:\test.ini",2) FileWrite($INI_handle,$Fixed_INI) FileClose($INI_handle) Regards, Rudi. Edited April 24, 2009 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Share this post Link to post Share on other sites
Tec 3 Report post Posted April 24, 2009 thx rudi that works Share this post Link to post Share on other sites
rudi 12 Report post Posted April 24, 2009 thx rudi that worksyou're welcome, rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Share this post Link to post Share on other sites