Click here to return to the KiXtart HelpDesk main page...

KiXtart Script Depot

Modification of .ini-files

;
; MANIPULATION OF INIFILE.INI
; Brian Petersen, 28.08.1998
; This is an example of ini-file handeling with KiXtart
;
; The Syntax in the KiXtart-script is:
; ReadProfileString("d:\kix95\inifile.ini","Section","Key")
; WriteProfileString("d:\kix95\inifile.ini","Section","Key","String")
;
; An ini-file is composed this way:
; [Section]
; Key=String
;

break on

$vaerdi = ReadProfileString("d:\kix95\inifile.ini","FilKontrol","TestFil")

color g+/n
cls
at(5,20) "Editing inifile.ini with the syntax:  [Section]"
at(6,20) "                                      Key=String"
at(8,20) "The ini-file contains this:"
at(8,45) $vaerdi
at(10,20) "Enter a new String:"
at(10,45) ""

GETS $Ny_key

WriteProfileString( "d:\kix95\inifile.ini" , "FilKontrol", "TestFil", $Ny_key)

at(15,0) ""
Exit