Page 1 of 1 1
Topic Options
#152840 - 2005-12-05 04:49 PM Question on WriteProfileString Command
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
When I write stuff to an INI file, how dow I get a line return between each section? I tried using a @crlf after the last entry, but the space seems to grow and grow each time the script runs. I tried $rc=writeprofilestring($inifile,'@WKSTA',' ',' ') but that gives me an equal, not a blank line. If I remove the second space, the line has no effect.

Thanks
Tylan

Top
#152841 - 2005-12-05 04:53 PM Re: Question on WriteProfileString Command
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
doesn't happen

it is written using a window API, so it isn't supported
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#152842 - 2005-12-05 05:01 PM Re: Question on WriteProfileString Command
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Your experience seems to suggest that pre-existing CRLF are maintained. So if you truly need to have a blank line between sections, trying preformatting the file the way you like and then use WriteProfileString to see if the format is maintained. If so, then add the extra @CRLF when the file is created but not when you edit an existing file.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#152843 - 2005-12-05 05:01 PM Re: Question on WriteProfileString Command
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
why would you want that?

INI-files are not meant to be read by humans(thats what readprofilestring() is for ),so no need to nice-format them.


Edited by Jochen (2005-12-05 05:02 PM)
_________________________



Top
#152844 - 2005-12-05 05:17 PM Re: Question on WriteProfileString Command
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
It's not a big deal if they aren't pretty. I just noticed when I looked at other people's sample code - Such as KSMS - His INI files were nice looking.
Top
#152845 - 2005-12-05 06:58 PM Re: Question on WriteProfileString Command
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hand created - but not required.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2375 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.096 seconds in which 0.067 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org