AustrianOak Posted June 9, 2008 Share Posted June 9, 2008 (edited) 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 June 9, 2008 by nowagain Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 9, 2008 Share Posted June 9, 2008 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 More sharing options...
AustrianOak Posted June 9, 2008 Author Share Posted June 9, 2008 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 More sharing options...
PsaltyDS Posted June 9, 2008 Share Posted June 9, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now