Newbie2 0 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? Share this post Link to post Share on other sites
trids 2 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. Share this post Link to post Share on other sites
PerryRaptor 1 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) Share this post Link to post Share on other sites
Insolence 2 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. Share this post Link to post Share on other sites
MHz 80 Posted January 12, 2005 That's why Triads gave the answer? Share this post Link to post Share on other sites