Jump to content

Is it possible to use variable with iniread func?


Go to solution Solved by Jos,

Recommended Posts

Posted (edited)

I am trying to use variable for the key in inifile with iniread function

$num = "2"
$record = IniRead ("1.ini", "func5", "init"&$num&"," & "dat")

Is it possible to use here variable?

Edited by topten
Posted

Sure.

Can you give an example of a key you want to use? Is there really a "," in the keyname?

My UDFs and Tutorials:

  Reveal hidden contents

 

  • Developers
  • Solution
Posted
  On 11/29/2014 at 5:22 PM, topten said:

May be I am using syntaxis wrong?

Yes

Try:

$record = IniRead("1.ini", "func5", "init" & $num, "dat")

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
×
×
  • Create New...