metjumper Posted February 16, 2009 Share Posted February 16, 2009 Hey There I coult'nt able to do this.I create a inputbox over a forum.when i write here smthing then i ll click a button on the forum to keep this veriable in an .txt file or .ini whatever...when i need this veriable i have to read it. here is my fail experiment. #Include <Constants.au3> #include <ButtonConstants.au3> #include <Date.au3> #include <GUIConstantsEX.au3> $hGUI = GUICreate("xxxx", 265, 325) ;GUI labels - GUICtrlCreateLabel("test", 5, 15, 200, 35) GuiCtrlCreateLabel("Version beta" & @CRLF & "test", 5, 295, 180, 50) $mod=GUICtrlCreateInput("",50,20,20,20) $Button_1 = GUICtrlCreateButton("Ayarlari kaydet", 5, 100, 76, 25, $BS_LEFT) $SuccessLog = FileWrite("test.ini", $mod) GUISetState() /////////////// Regards. Link to comment Share on other sites More sharing options...
GaryFrost Posted February 16, 2009 Share Posted February 16, 2009 FileWrite("test.ini", GuiCtrlRead($mod)) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
metjumper Posted February 16, 2009 Author Share Posted February 16, 2009 FileWrite("test.ini", GuiCtrlRead($mod))Thanks for reply Gary ...whold you show me how i can set this commands on button click?when i click buttton takes veriable in inputs to save xxx.ini.i tryed some combination like that$Button_1 = GUICtrlCreateButton("save veriable", 5, 100, 76, 25, $BS_LEFT)FileWrite($file,"",($mod))$Button_1=FileWrite("test.ini",GUICtrlRead($mod)) but wont work. Link to comment Share on other sites More sharing options...
AlmarM Posted February 16, 2009 Share Posted February 16, 2009 Thanks for reply Gary ... whold you show me how i can set this commands on button click? when i click buttton takes veriable in inputs to save xxx.ini. i tryed some combination like that $Button_1 = GUICtrlCreateButton("save veriable", 5, 100, 76, 25, $BS_LEFT) FileWrite($file,"",($mod)) $Button_1=FileWrite("test.ini",GUICtrlRead($mod)) but wont work.Try this: #include <Constants.au3> #include <ButtonConstants.au3> #include <Date.au3> #include <GUIConstantsEX.au3> $GUI = GUICreate("xxxx", 265, 325) GUICtrlCreateLabel("test", 5, 15, 200, 35) GUICtrlCreateLabel("Version beta" & @CRLF & "test", 5, 295, 180, 50) $Mod = GUICtrlCreateInput("", 50, 20, 20, 20) $Button_1 = GUICtrlCreateButton("Ayalari kaydet", 5, 100, 76, 25, $BS_LEFT) GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Button_1 $Read = GUICtrlRead($Mod) $SuccesLog = FileWrite("test.ini", $Read) EndSelect WEnd AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
metjumper Posted February 17, 2009 Author Share Posted February 17, 2009 Thanks for Time AlmarM HotKeySet("{F5}","smthing") $Mod = GUICtrlCreateInput("test1", 80, 230, 250, 18) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetColor(-1,0x00FFFF) $Mod = GUICtrlCreateInput("test2", 80, 230, 250, 18) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetColor(-1,0x00FFFF) GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Button_1 $Read = GUICtrlRead($Mod) $SuccesLog = FileWrite("test.ini", $Read) EndSelect WEnd func smthing() ...................... in this area i have to put code like this read test.ini (test1,test2) send("test1") sleep(100) send("test2") WEnd. any clue pls? Link to comment Share on other sites More sharing options...
metjumper Posted February 17, 2009 Author Share Posted February 17, 2009 up Link to comment Share on other sites More sharing options...
GaryFrost Posted February 17, 2009 Share Posted February 17, 2009 up Suggest waiting at least 24 hours before bumping the topic SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
metjumper Posted February 17, 2009 Author Share Posted February 17, 2009 i didnt see this rulez sory. Link to comment Share on other sites More sharing options...
metjumper Posted February 18, 2009 Author Share Posted February 18, 2009 (edited) $iniread_test1 = IniRead(@ScriptDir & "/config.ini", "D", "Mode1","") $xxx = GUICtrlCreateInput($iniread_test1, 70, 235, 60, 21) IniWrite(@ScriptDir & "/config.ini", "D", "Mode1",GUICtrlRead($xxx)) at least i found out. so pls someone can explain to me how i can send variable from ini? example ////////// hotkeyset("{F5}","testsend") send()====what i should write here send variable? wend Regards Edited February 18, 2009 by metjumper Link to comment Share on other sites More sharing options...
metjumper Posted February 18, 2009 Author Share Posted February 18, 2009 hotkeyset("f5","test") func test() $var =IniRead(@ScriptDir & "/config.ini", "DOTA", "Mode1","") send($var) wend okay i got it its working maybe someone ll need it too. Thaks for replys . 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