Re: Re: IniRenameSection

"Sensei J. Richard Kirkham B.Sc" <[email protected]> Thu, 13 Sep 2007 22:58:51 -0700 (PDT)
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
Thanks

After I discovered it changed the order of the section and placed the changed on on the bottom I used a stringreplace instead

Rick

----- Original Message ----
From: valery_vi <[email protected]>
To: [email protected]
Sent: Wednesday, September 12, 2007 11:07:12 PM
Subject: [AutoIt] Re: IniRenameSection


Hi Rick!

It's easy trick, I think. You have to write:
;Name of INI file
$FileName = @ScriptDir & "My.ini"
;Name of old Topic in INI file
$OldName = "Your old section name"
;Name of new Topic in INI file
$NewName = "Your new section name"

$res = IniRenameSection ( $FileName, $OldName, $NewName)

if Not $res then 
MsgBox(0,'Error!','The topic with name ' & $NewName & ' already exists!')
endif

Valery

--- In [email protected], "Sensei J. Richard Kirkham B.Sc"
<tutor2000@...> wrote:
>
> $res = IniRenameSection(@ScriptDir & "My.ini", "MySection",
"MyNewSection",1)
> 
> So this makes it a var but how do I actually rename the section in
the ini file?
> 
> Thanks
> 
> Rick
> 
> [Non-text portions of this message have been removed]
>





Yahoo! Groups Links



[Non-text portions of this message have been removed]