Sign in to follow this  
Followers 0
grakker

INI rename section

8 posts in this topic

I'm beating my head against the wall. Nothing new to me when I try to program anything.

I have a program to write up my students. I keep a list of how I have written them up in an ini file. For my 7th period class it would look something like this:

7th.ini

[Jose Martinez]
1=1#4#01/11/2006#talking#Jose Martinez 7th_talking_01-11-2006-7071.txt
2=2#4#01/13/2006#book#Jose Martinez 7th_book_01-13-2006-8730.txt

It works fine so far. I can add or update my ini files with no problem. But here's the problem. What if Jose Martinez is actually Jose Martinet? I would like to change the section name. I can update the values using iniwrite. It would be nice to do a _ReplaceStringInFile(blah, blah, blah). While I can get _ReplaceStringInFile to work on normal .txt files, it doesn't seem to work for me with .ini files. Anyone have a clue on what I should do?

Share this post


Link to post
Share on other sites



HI,

maybe you can try something like this:

$res = IniRenameSection(@ScriptDir & "7th.ini", "OldSection", "MyNewSection")

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

HI,

maybe you can try something like this:

$res = IniRenameSection(@ScriptDir & "7th.ini", "OldSection", "MyNewSection")

So long,

Mega

:lmao:

You know sometimes I have that feeling like I wish I could go back in time and do something different so I wouldn't look like such an idiot. Oh well, wouldn't learn anything without asking. I'm not sure why I have that function, but it's not in my help file...

Anyway, thanks...

Share this post


Link to post
Share on other sites

it's not in the stable release help file but it's in the beta... maybe you have the beta installed but you're still using the old help file?

I'm not sure what's going on. I thought that I had the latest beta (if anything, it's not more than a month old). The help file has all the GUI stuff.... Hmmm. I'll just download the latest and see what happens.

greenmachine: I can't imagine not using scite.

Share this post


Link to post
Share on other sites

I'm not sure what's going on. I thought that I had the latest beta (if anything, it's not more than a month old). The help file has all the GUI stuff.... Hmmm. I'll just download the latest and see what happens.

greenmachine: I can't imagine not using scite.

I couldn't either, but some people still do. That's why I mentioned it. I just told a guy about it like an hour ago. He was trying to make a game. Hum, some people just try to do things the hard way.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I was running into the same problem (functions existed, help didn't) when I started using Beta... until I realized the help files were different. In case you missed it, be sure you open

Start --> Programs --> AutoIt V3 --> beta --> AutoIt Help File (beta)

LD

Edited by LondonNDIB

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0