Tec Posted April 24, 2009 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
FinalVersion Posted April 24, 2009 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]
Tec Posted April 24, 2009 Author 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.
FinalVersion Posted April 24, 2009 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]
rudi Posted April 24, 2009 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!
rudi Posted April 24, 2009 Posted April 24, 2009 thx rudi that worksyou're welcome, rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now