Info Posted March 6, 2008 Share Posted March 6, 2008 #include <GUIConstants.au3> $TheGui = GUICreate("abcdefghijklmnopqrstuvwxyznowiknowmyabc", 388, 100, 258, 181) $StartButton = GUICtrlCreateButton("Start", 147, 30, 89, 33, 0) GUICtrlCreateInput ( "save this line", 20, 70, 100, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $StartButton Sleep ( 100 ) EndSelect WEnd Now I want it to IniWrite the GUICtrlCreateInput's line as an .ini file, and in the next time I load the file, the line I wrote in the GUICtrlCreateInput will be there... Thanks Link to comment Share on other sites More sharing options...
AcidCorps Posted March 6, 2008 Share Posted March 6, 2008 Look at GuiCtrlRead() Link to comment Share on other sites More sharing options...
Info Posted March 6, 2008 Author Share Posted March 6, 2008 I'm newbie at this... I did search for an answer. Please just answer my question Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 6, 2008 Moderators Share Posted March 6, 2008 I'm newbie at this... I did search for an answer.Please just answer my question He did answer your question.In order to read the GUIs control "Input", you'll need to use GUICtrlRead().So, to put the text in, you'd do something like:IniWrite("MyIni.ini", "mySection", GUICtrlRead($inputbox), "N/A")Next time, rather than assume that someone hasn't given you the answer, just because they didn't write the code for you... actually look up what they suggest first . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Info Posted March 6, 2008 Author Share Posted March 6, 2008 I still don't know what to do with the IniRead() =/ Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 6, 2008 Share Posted March 6, 2008 IniWrite("MyIni.ini", "mySection", GUICtrlRead($inputbox), "N/A")Wouldn't IniWrite("MyIni.ini", "mySection", "inputbox", GUICtrlRead($inputbox)) make a little more sense?Then you could get it back with GUICtrlSetData($inputbox, IniRead("MyIni.ini", "mySection", "inputbox", "")). Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 6, 2008 Moderators Share Posted March 6, 2008 (edited) I still don't know what to do with the IniRead() =/I can tell you a few things IniRead is going to be at the beginning of your GUI.(Think I may have put the params wrong in the other IniWrite example, but this is just a gist post)$sOldValue = IniRead("MyIni.ini", "mySection", "myinput");My GUI Codeguicreate etc...$inputbox = GUICtrlCreateInput ($sOldValue, 20, 70, 100, 20)This is really explained in both the IniRead/GUI stuff. If you can't put the rudimentary stuff together, I'd suggest you crawl before you walk and do the AutoIt 1-2-3 Interactive Tutorial Edited March 6, 2008 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Info Posted March 6, 2008 Author Share Posted March 6, 2008 Thank you all really helped me 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