bald1 Posted October 6, 2009 Share Posted October 6, 2009 Hey guys I bet this is a question often brought up, tho i failed to find my answer via the search function, and help file wasn't much help either. I have chunks of script that I wish to make into functions. The arrays and variables belonging to the functions i would very much like to put into outside .ini files, to make it all easier to read, develop and trim. How do i go about this? How do I pull data from an outside (of script) .ini file into the functions called in the script that i want to run? Link to comment Share on other sites More sharing options...
Hawkwing Posted October 6, 2009 Share Posted October 6, 2009 (edited) Look at IniRead. Edited October 6, 2009 by Hawkwing The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
bald1 Posted October 6, 2009 Author Share Posted October 6, 2009 (edited) I am, but i need help to incorporate it into the entire picture. Could u perhaps make a little example that i could use in the scenario i described? edit: Also, how do i build up this .ini file? Same way as i do with vars and arrays in autoit format? Edited October 6, 2009 by bald1 Link to comment Share on other sites More sharing options...
Info Posted October 6, 2009 Share Posted October 6, 2009 http://www.autoitscript.com/forum/index.php?showtopic=71019 #include <GUIConstants.au3> $MainGUI = GUICreate("INI Stuff", 202, 95, -1, -1) $Input = GUICtrlCreateInput("", 8, 8, 185, 21) $Clear = GUICtrlCreateButton ("Clear Input's Data", 8, 36, 185, 25) $IniWrite = GUICtrlCreateButton("Ini Write", 8, 65, 57, 25, 0) $IniRead = GUICtrlCreateButton("Ini Read", 72, 65, 57, 25, 0) $IniDelete = GUICtrlCreateButton("Ini Delete", 136, 65, 57, 25, 0) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $IniWrite IniWrite ("Ini File.ini", "Input Section", "Input Info", GUICtrlRead($Input)) Case $IniRead GUICtrlSetData ($Input, IniRead ("Ini File.ini", "Input Section", "Input Info", "")) Case $IniDelete IniDelete ("Ini File.ini", "Input Section", "Input Info") Case $Clear GUICtrlSetData ($Input, "") EndSwitch WEnd Link to comment Share on other sites More sharing options...
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