JoeWagner Posted May 7, 2009 Posted May 7, 2009 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,
MrMitchell Posted May 7, 2009 Posted May 7, 2009 (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 May 7, 2009 by MrMitchell
torels Posted May 7, 2009 Posted May 7, 2009 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
JoeWagner Posted May 7, 2009 Author Posted May 7, 2009 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
Valuater Posted May 7, 2009 Posted May 7, 2009 Might want to take a look at this, you can steal some of the functions for iniwrite for a listviewhttp://www.autoitscript.com/forum/index.ph...st&p=2820678)
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