Sign in to follow this  
Followers 0
JoeWagner

Store Varriable names ($var1) in INI file

5 posts in this topic

Is it possible to store variable names in an INI file to auto populate the correct data in a list view control with INIReadSection

Ini file would look like:

[section1]

List item1=$var1

List item2=$var2

List item3=$var1

etc...

I've done it in my script and the returned text matches global variables already set and tested, but alas the list is populated

with the $var1 text and not the actual value of $var1.

I suspect this is an impossibility but I'm hopeful. This ability would greatly reduce the number of IF compares I would otherwise need to do.

I apologize if this has already been covered, I wasn't able to articulate the search terms to find anything even remotely related.

Any feedback on this would be greatly appreciated.

Thanks,

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I think you can try "Eval ( string )". Look it up for syntax and exact usage, but I hope that's it.

On the flip side, use "Assign ( "varname", "data" [, flag] )" to assign it.

Edited by MrMitchell

Share this post


Link to post
Share on other sites

Try Assign() function or better... Use Arrays! (bidimensional if you want ^_^


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

Thanks for the speedy answer...

Eval seems to do what I need it to do.

Assign doesn't quite work because the value I am referring to is an array value from INIREADSECTION and from what I understand from the help file this would simply reassign to requested value to the Array value (if Assign worked on array values).

I have to do some more testing but Eval seems to exactly what I needed.

Thanks again

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  
Followers 0