Jump to content
Sign in to follow this  
Newbie2

INIREAD issues

Recommended Posts

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? :idiot:

Share this post


Link to post
Share on other sites

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

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

I think perry is trying to say, you have to know the key first anyway :idiot:


"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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...