Sign in to follow this  
Followers 0
unknown12

INI Reading

8 posts in this topic

How can I get autoit to read a multi-line INI value?

using this atm:

IniRead("C:\Temp\myfile.ini", "section2", "key", "NotFound")
Which only reads the first line.

Any ideas?

Share this post


Link to post
Share on other sites



inireadsection()... see help

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

INI values are stored on a single line so there is no such thing as a "multi-line INI value". If you need to have embedded carriage returns or line feeds, you'll need to translate that to something else on write and translate back to CR or LF on read.

Share this post


Link to post
Share on other sites

INI values are stored on a single line so there is no such thing as a "multi-line INI value". If you need to have embedded carriage returns or line feeds, you'll need to translate that to something else on write and translate back to CR or LF on read.

Got an example?

Share this post


Link to post
Share on other sites

No, nor would I show you one. It's a simple concept. If you have any chance at all at being half-way decent at AutoIt, you should be able to figure this very simple problem out on your own. Me holding your hand showing you how to do it isn't going teach you much.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Got an example?

StringReplace($String, @CR, Chr(01))

Do whatever

StringReplace($String, Chr(01), @CR)

Edit:

Before I'm flammed for showing how to change something, do something, then change it back... please note the post times :nuke:

Edit2:

Then again, the more I look at it, it looks like another one of my, :P wtf am I talking about posts.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Woo! Don't give him code, tell him that he should replace every Carridge Return with "@CR" and every Line Feed with "@LF". Then let him figure out how to convert them himself. This is in no way sexist, using the term "him", unknown is merely a difficult name to distinguish.

Share this post


Link to post
Share on other sites

Woo! Don't give him code, tell him that he should replace every Carridge Return with "@CR" and every Line Feed with "@LF". Then let him figure out how to convert them himself. This is in no way sexist, using the term "him", unknown is merely a difficult name to distinguish.

I have absolutely no idea what your talking about or who you are talking too (your reply is more confusing than the thread itself)... "him"? I don't see that anywhere. And if your talking to me, if you regard 2 lines "code" then sorry... but... just saying StringReplace() would have been the same IMHO.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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