bomboa Posted May 28, 2007 Share Posted May 28, 2007 Hey, Ive been reading for a while and I know this is probably simple but I just can't figure it out! Can someone tell me how to save the value from an input box to a specific area of a .ini in same directory? Thanks. Link to comment Share on other sites More sharing options...
star2 Posted May 28, 2007 Share Posted May 28, 2007 (edited) THIS IS THE INPUTBOX EXAMPLE $1 = InputBox ("TEST","PUT TESXT HERE") If $1 <> "" Then FileDelete ("TEST.INI") FileWrite('TEST.INI', $1) MsgBox(0,'Info','Data written to test.ini') Else MsgBox (-1, " info " , " you did not enter any data !!!") EndIfoÝ÷ Ù1ÈHPÃËSQ«¢+Ø¥¹±Õ±ÐíU% ½¹ÍѹÑ̹ÔÌÐì)U% ÉÑ ÅÕ½ÐíÑÍÐÅÕ½Ðì°ÄÜÀ°ÄÈÀ¤(ÀÌØí%9|ÄôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÈÀ°ÄÔÀ¤(ÀÌØí%9|ÈôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÔÀ°ÄÔÀ¤(ÀÌØí DON'T FORGET TO USE THE AUTOIT BIBLE WICH IS THE HELP FILE HOPE IT HELPS SEE YA Edited May 28, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] Link to comment Share on other sites More sharing options...
eltorro Posted June 1, 2007 Share Posted June 1, 2007 Use IniWrite() #include <GUIConstants.au3> GUICreate("test", 170, 120) $IN_1 = GUICtrlCreateInput ("",10,20,150) $IN_2 = GUICtrlCreateInput ("",10,50,150) $GO = GUICtrlCreateButton ("DO",10,85,150) GUISetState () While 1 $msg = GUIGetMsg () If $MSG = $GUI_EVENT_CLOSE Then ExitLoop EndIf $1 = GUICtrlRead ($IN_1) $2 = GUICtrlRead ($IN_2) $DATA = $1 & @CRLF & $2 If $msg = $GO Then If $1 <> "" Or $2 <> "" Then IniWrite ( "test.ini", "Controls", "Input1", GUICtrlRead ($IN_1) ) IniWrite ( "test.ini", "Controls", "Input2", GUICtrlRead ($IN_2) ) MsgBox(266304,'Info','Data written to test.ini') Else MsgBox (266288, " info " , " you did not enter any data !!!") EndIf EndIf WEnd Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
CoffeeBeans Posted September 17, 2007 Share Posted September 17, 2007 I have been using Auto-it for 2 weeks and am not really used to it yet. I have searched the forums and havent gotten much details on how to do this. I iried this example but it doesnt show what the current values are.. how would i get it to load the settings and display them again after its ran again.. I have wrote a script that can read an INI but i dont know how to display and write new values. Please help. I have an ini that i read from that is like [firstset] object1 = this1 object2 = this2 object3 = this3 objest4 = this4 .. this goes on for 6 rows [secondset] Item1 = setting2 item2 = setting3 item3 = setting4 and this continues on for 5 rows Link to comment Share on other sites More sharing options...
Valuater Posted September 17, 2007 Share Posted September 17, 2007 here is a great example of exactly what you are askinghttp://www.autoitscript.com/forum/index.ph...st&p=1543928) 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