Page 1 of 1 1
Topic Options
#7037 - 2001-02-21 08:36 PM WRITELINE problem
Anonymous
Unregistered


I'm a novice to kix scripting, but I can't seem to use the WRITELINE command correctly to edit an .ini file. Any advise??
Top
#7038 - 2001-02-21 08:39 PM Re: WRITELINE problem
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Welcome grady - you might want to consider using kix's readprofilestring() and writeprofilestring(0 functions to read/edit .ini files... read about them in the manual. These functions make editing ini files a cake walk !

Cheers.

Shawn.

Top
#7039 - 2001-02-21 11:39 PM Re: WRITELINE problem
Anonymous
Unregistered


Not to seem even more thick, but I tried this
test script, and it didn't work:

writeprofilestring ("test.ini", "SystemInfo", "ComputerName", "testing")

Where the test.ini file resides in the C:\Windows dir. Do I need add the line CD "C:\Windows" above the writeprofilesting line?

Top
#7040 - 2001-02-22 02:12 PM Re: WRITELINE problem
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Grady...

I usually always specify the full pathname when I use readprofilestring(), however, the default location is like you said - in the "windows" directory... here's the actual quote from mircosoft...

quote:

lpFileName
[in] Pointer to a null-terminated string that specifies the name of the initialization file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.

I just tested this on my Win2K box and it worked like a charm !

Can anybody else verify on Win9x ?

Shawn.

Top
#7041 - 2001-02-22 04:38 PM Re: WRITELINE problem
Anonymous
Unregistered


Basically KIX write the INI-File in the home-directory of the Windows9X -> C:\Windows. But I think it would be better You write the path completely. Other people will be thankful ...
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 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.17 seconds in which 0.091 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