Jump to content

IniRead or IniReadSection


Recommended Posts

What function is the best to find all the keys that have values with certain text and extract each and everyone of those keys along with their values?

my goal is to fix a problem with my ini keys and values getting overwritten. so im taking the approach where i look for values and in those values i look for certain text using StringSplit etc. and if it has let's say "123" somewhere in the values it takes the values as well as their keys and stores them in temporary variables or whatever and then lets the ini be written to. after the ini is written to, it will put back those keys and values with the certain text in them.

im sorry if i've been confusing and will explain more into detail if needed.

can anyone help me out with this one? :)

Edited by nowagain
Link to comment
Share on other sites

What function is the best to find all the keys that have values with certain text and extract each and everyone of those keys along with their values?

my goal is to fix a problem with my ini keys and values getting overwritten. so im taking the approach where i look for values and in those values i look for certain text using StringSplit etc. and if it has let's say "123" somewhere in the values it takes the values as well as their keys and stores them in temporary variables or whatever and then lets the ini be written to. after the ini is written to, it will put back those keys and values with the certain text in them.

im sorry if i've been confusing and will explain more into detail if needed.

can anyone help me out with this one? :)

Read the section names with IniReadSectionNames(), then loop through that array to read each section with IniReadSection(). For each section loop through the values and save the ones you want.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Thank you,

One question, what if I I only want to search through one section, IniReadSectionNames would become unnecessary right?

Then I would just loop through the one section with IniReadSection and extract the data from that?

Link to comment
Share on other sites

One question, what if I I only want to search through one section, IniReadSectionNames would become unnecessary right?

Then I would just loop through the one section with IniReadSection and extract the data from that?

Sounds reasonable.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...