kkhyoyoyo 0 Report post Posted May 19, 2015 Before I ask u guys. I'm sorry I can't speak english.I think I can't understand u. so Include screenshot under page. I hope understand you.when someone put "01"(input1) and put "03"(input2) then checkbox1 checked. after this ini writeIniWrite("example.ini","General","Pc Name" , GUICtrlRead($input3) & GUICtrlRead($Input1)) is this correct?I'm sorry. I'm really newby.. Help me~#include <ButtonConstants.au3>#include <EditConstants.au3>#include <GUIConstantsEx.au3>#include <WindowsConstants.au3>#Region ### START Koda GUI section ### Form=c:\users\administrator\desktop\input01.kxf$Form1_1 = GUICreate("Form1", 324, 376, 320, 240)$Input1 = GUICtrlCreateInput("PC start number", 32, 85, 113, 21)$Input2 = GUICtrlCreateInput("PC last number", 172, 85, 113, 21)$Input3 = GUICtrlCreateInput("PC name", 104, 24, 113, 21)$Button1 = GUICtrlCreateButton("confirm", 32, 280, 81, 25)$Button2 = GUICtrlCreateButton("cancle", 172, 280, 81, 25)$Checkbox2 = GUICtrlCreateCheckbox("CONFIG2", 32, 115, 201, 17)$Checkbox1 = GUICtrlCreateCheckbox("CONFIG1", 32, 55, 73, 17)$Input4 = GUICtrlCreateInput("PC start number", 32, 145, 113, 21)$Input5 = GUICtrlCreateInput("PC last number", 172, 145, 113, 21)$Checkbox3 = GUICtrlCreateCheckbox("CONFIG3", 32, 175, 113, 17)$Input6 = GUICtrlCreateInput("PC start number", 32, 205, 113, 21)$Input7 = GUICtrlCreateInput("PC last number", 172, 205, 113, 21)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button2 $Button2 = $GUI_EVENT_CLOSE Exit Case $msg = $Button1 If GUICtrlRead($Input1) = 1 Then IniWrite("example.ini","General","Pc Name" , GUICtrlRead($input3) & GUICtrlRead($Input1))EndIf EndSelect WEndhow to make like this picture Iniwrite.. Share this post Link to post Share on other sites
javiwhite 15 Report post Posted May 19, 2015 Hey,Is this what you're looking for?I think i've understood what you're after.expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\administrator\desktop\input01.kxf $Form1_1 = GUICreate("Form1", 324, 376, 320, 240) $Input1 = GUICtrlCreateInput("PC start number", 32, 85, 113, 21) $Input2 = GUICtrlCreateInput("PC last number", 172, 85, 113, 21) $Input3 = GUICtrlCreateInput("PC name", 104, 24, 113, 21) $Button1 = GUICtrlCreateButton("confirm", 32, 280, 81, 25) $Button2 = GUICtrlCreateButton("cancle", 172, 280, 81, 25) $Checkbox2 = GUICtrlCreateCheckbox("CONFIG2", 32, 115, 201, 17) $Checkbox1 = GUICtrlCreateCheckbox("CONFIG1", 32, 55, 73, 17) $Input4 = GUICtrlCreateInput("PC start number", 32, 145, 113, 21) $Input5 = GUICtrlCreateInput("PC last number", 172, 145, 113, 21) $Checkbox3 = GUICtrlCreateCheckbox("CONFIG3", 32, 175, 113, 17) $Input6 = GUICtrlCreateInput("PC start number", 32, 205, 113, 21) $Input7 = GUICtrlCreateInput("PC last number", 172, 205, 113, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button2 $Button2 = $GUI_EVENT_CLOSE Exit Case $msg = $Button1 $Data = '' if GUIctrlRead($CheckBox1) == $GUI_CHECKED Then $Data &= GUICtrlRead($input3) & GUICtrlRead($Input1) if GUIctrlRead($CheckBox2) == $GUI_CHECKED Then $Data &= GUICtrlRead($input3) & GUICtrlRead($Input4) if GUIctrlRead($CheckBox3) == $GUI_CHECKED Then $Data &= GUICtrlRead($input3) & GUICtrlRead($Input6) IniWrite("example.ini","General","Pc Name" , $Data) EndSelect WEndMany Thanks Javi give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime. Share this post Link to post Share on other sites
kkhyoyoyo 0 Report post Posted May 20, 2015 thanks for your answer javiwhite~but it dosen't work..I mean its not making ini filecan u check one more time? Share this post Link to post Share on other sites
nitekram 68 Report post Posted May 20, 2015 Try this:expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\administrator\desktop\input01.kxf $Form1_1 = GUICreate("Form1", 324, 376, 320, 240) $Input1 = GUICtrlCreateInput("PC start number", 32, 85, 113, 21) $Input2 = GUICtrlCreateInput("PC last number", 172, 85, 113, 21) $Input3 = GUICtrlCreateInput("PC name", 104, 24, 113, 21) $Button1 = GUICtrlCreateButton("confirm", 32, 280, 81, 25) $Button2 = GUICtrlCreateButton("cancle", 172, 280, 81, 25) $Checkbox2 = GUICtrlCreateCheckbox("CONFIG2", 32, 115, 201, 17) $Checkbox1 = GUICtrlCreateCheckbox("CONFIG1", 32, 55, 73, 17) $Input4 = GUICtrlCreateInput("PC start number", 32, 145, 113, 21) $Input5 = GUICtrlCreateInput("PC last number", 172, 145, 113, 21) $Checkbox3 = GUICtrlCreateCheckbox("CONFIG3", 32, 175, 113, 17) $Input6 = GUICtrlCreateInput("PC start number", 32, 205, 113, 21) $Input7 = GUICtrlCreateInput("PC last number", 172, 205, 113, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button2 $Button2 = $GUI_EVENT_CLOSE Exit Case $msg = $Button1 if GUIctrlRead($CheckBox1) == $GUI_CHECKED Then IniWrite("example.ini","CONFIG1","Pc Name" , GUICtrlRead($input3)) IniWrite("example.ini","CONFIG1","PC start number" , $Input1) IniWrite("example.ini","CONFIG1","PC last number" , $Input2) EndIf if GUIctrlRead($CheckBox2) == $GUI_CHECKED Then IniWrite("example.ini","CONFIG2","Pc Name" , GUICtrlRead($input3)) IniWrite("example.ini","CONFIG2","PC start number" , $Input4) IniWrite("example.ini","CONFIG2","PC last number" , $Input5) EndIf if GUIctrlRead($CheckBox3) == $GUI_CHECKED Then IniWrite("example.ini","CONFIG3","Pc Name" , GUICtrlRead($input3)) IniWrite("example.ini","CONFIG3","PC start number" , $Input6) IniWrite("example.ini","CONFIG3","PC last number" , $Input7) EndIf EndSelect WEnd 2¢All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDFLearning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming TipsExcel ChangesControlHover.UDFGDI_PlusDraw_On_ScreenGDI BasicsGDI_More_BasicsGDI RotateGDI GraphGDI CheckExistingItemsGDI TrajectoryReplace $ghGDIPDll with $__g_hGDIPDllDLL 101?Array via ObjectGDI SwimlaneGDI Plus French 101 SiteGDI Examples UEZGDI Basic ClockGDI DetectionTernary operator Share this post Link to post Share on other sites
kkhyoyoyo 0 Report post Posted May 20, 2015 thanks guys~ u guys really helpfulcan i ask one more thing?I want show when put "01"(input1) and put "03"(input2) it will be INI file likepc name=pc01pc name=pc02pc name=pc03 I mean 01 through 03 Share this post Link to post Share on other sites
nitekram 68 Report post Posted May 20, 2015 That would just mean you have to change the first input box (computer name) to what ever you want...If you want to use the same computer name for each configuration.If that is not the case, just create another input box for each of the other configurations, and then change the $input1 for the right config to your new input variable. 2¢All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDFLearning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming TipsExcel ChangesControlHover.UDFGDI_PlusDraw_On_ScreenGDI BasicsGDI_More_BasicsGDI RotateGDI GraphGDI CheckExistingItemsGDI TrajectoryReplace $ghGDIPDll with $__g_hGDIPDllDLL 101?Array via ObjectGDI SwimlaneGDI Plus French 101 SiteGDI Examples UEZGDI Basic ClockGDI DetectionTernary operator Share this post Link to post Share on other sites
kkhyoyoyo 0 Report post Posted May 21, 2015 Im sorry.. I could't understand ur explanationhow about this souce?$ini = @ScriptDir & "\test.ini"$key=1For $value = 1 To 10 Step 1 IniWriteSection($ini, "general " & $value, "") For $key = 1 To 10 Step 1 IniWrite($ini, "Section " & $value, "Value" &$key, $key) NextNextIf I use this soucecould u suggest more better souce for me? Share this post Link to post Share on other sites
nitekram 68 Report post Posted May 21, 2015 I am not sure what you are looking for. Can you show manually the format you are looking for with the INI file layout - with a couple of entries. 2¢All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDFLearning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming TipsExcel ChangesControlHover.UDFGDI_PlusDraw_On_ScreenGDI BasicsGDI_More_BasicsGDI RotateGDI GraphGDI CheckExistingItemsGDI TrajectoryReplace $ghGDIPDll with $__g_hGDIPDllDLL 101?Array via ObjectGDI SwimlaneGDI Plus French 101 SiteGDI Examples UEZGDI Basic ClockGDI DetectionTernary operator Share this post Link to post Share on other sites
kkhyoyoyo 0 Report post Posted May 21, 2015 Im sorry. my explanation suck..so I made paint. I hope u undersand my think Share this post Link to post Share on other sites
nitekram 68 Report post Posted May 21, 2015 (edited) I think your logic might be wrong here. The PC NAME should be unique in the INI file?[General] - has to be uniquekey1 - the key can be only one, under each section name General, so your next section can also contain the key namekey2 = data - the data can be anything you wantWIKI INI FILE Edited May 21, 2015 by nitekram 2¢All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDFLearning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming TipsExcel ChangesControlHover.UDFGDI_PlusDraw_On_ScreenGDI BasicsGDI_More_BasicsGDI RotateGDI GraphGDI CheckExistingItemsGDI TrajectoryReplace $ghGDIPDll with $__g_hGDIPDllDLL 101?Array via ObjectGDI SwimlaneGDI Plus French 101 SiteGDI Examples UEZGDI Basic ClockGDI DetectionTernary operator Share this post Link to post Share on other sites
nitekram 68 Report post Posted May 21, 2015 Maybe you can use this to get the idea?expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\administrator\desktop\input01.kxf $Form1_1 = GUICreate("Form1", 324, 376, 320, 240) $Input1 = GUICtrlCreateInput("1", 32, 85, 113, 21) $Input2 = GUICtrlCreateInput("3", 172, 85, 113, 21) $Input3 = GUICtrlCreateInput("PC name", 104, 24, 113, 21) $Button1 = GUICtrlCreateButton("confirm", 32, 280, 81, 25) $Button2 = GUICtrlCreateButton("cancle", 172, 280, 81, 25) $Checkbox2 = GUICtrlCreateCheckbox("CONFIG2", 32, 115, 201, 17) $Checkbox1 = GUICtrlCreateCheckbox("CONFIG1", 32, 55, 73, 17) $Input4 = GUICtrlCreateInput("4", 32, 145, 113, 21) $Input5 = GUICtrlCreateInput("6", 172, 145, 113, 21) $Checkbox3 = GUICtrlCreateCheckbox("CONFIG3", 32, 175, 113, 17) $Input6 = GUICtrlCreateInput("7", 32, 205, 113, 21) $Input7 = GUICtrlCreateInput("9", 172, 205, 113, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button2 $Button2 = $GUI_EVENT_CLOSE Exit Case $msg = $Button1 if GUIctrlRead($CheckBox1) == $GUI_CHECKED Then ; config 1 For $x = GUICtrlRead($Input1) To GUICtrlRead($Input2) IniWrite("example.ini", "General" ,"Pc Name" & $x , '(config1)') Next EndIf if GUIctrlRead($CheckBox2) == $GUI_CHECKED Then ; config 2 For $x = GUICtrlRead($Input4) To GUICtrlRead($Input5) IniWrite("example.ini", "General" ,"Pc Name" & $x , '(config2)') Next EndIf if GUIctrlRead($CheckBox3) == $GUI_CHECKED Then For $x = GUICtrlRead($Input6) To GUICtrlRead($Input7) IniWrite("example.ini", "General" ,"Pc Name" & $x , '(config3)') Next EndIf EndSelect WEnd 2¢All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDFLearning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming TipsExcel ChangesControlHover.UDFGDI_PlusDraw_On_ScreenGDI BasicsGDI_More_BasicsGDI RotateGDI GraphGDI CheckExistingItemsGDI TrajectoryReplace $ghGDIPDll with $__g_hGDIPDllDLL 101?Array via ObjectGDI SwimlaneGDI Plus French 101 SiteGDI Examples UEZGDI Basic ClockGDI DetectionTernary operator Share this post Link to post Share on other sites