Newbie2 Posted January 12, 2005 Posted January 12, 2005 Let's assume I have this INI file: [MySection] Home=123456789 Office=987654321 Cell=123459876 I know I can extract each value of each key using INIREAD, but I wanna also to be able to exteact the KEY itself. Possible?
trids Posted January 12, 2005 Posted January 12, 2005 Read each line: if the line has a "=", then StringSplit on "=" .. the array element with index = [1] will be the key name.
PerryRaptor Posted January 12, 2005 Posted January 12, 2005 Check the help file for IniRead() IniRead ( "filename", "section", "key", "default" ) A standard ini file looks like: [sectionName] Key=Value Related IniDelete, IniWrite, FileReadLine Example $var = IniRead("C:\Temp\myfile.ini", "section2", "key", "NotFound") MsgBox(4096, "Result", $var)
Insolence Posted January 12, 2005 Posted January 12, 2005 I think perry is trying to say, you have to know the key first anyway "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
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