bybordo Posted October 14, 2013 Share Posted October 14, 2013 expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 486, 275, 192, 124) $Checkbox1 = GUICtrlCreateCheckbox("C:", 88, 64, 33, 17) $Checkbox2 = GUICtrlCreateCheckbox("D:", 128, 64, 33, 17) $Checkbox3 = GUICtrlCreateCheckbox("A:", 88, 96, 33, 17) $Checkbox4 = GUICtrlCreateCheckbox("B:", 128, 96, 33, 17) $Checkbox5 = GUICtrlCreateCheckbox("E:", 168, 96, 33, 17) $Checkbox6 = GUICtrlCreateCheckbox("F:", 208, 96, 33, 17) $Checkbox7 = GUICtrlCreateCheckbox("G:", 248, 96, 33, 17) $Checkbox8 = GUICtrlCreateCheckbox("H:", 288, 96, 33, 17) $Checkbox9 = GUICtrlCreateCheckbox("I:", 328, 96, 33, 17) $Checkbox10 = GUICtrlCreateCheckbox("J:", 368, 96, 33, 17) $Checkbox11 = GUICtrlCreateCheckbox("K:", 88, 128, 33, 17) $Checkbox12 = GUICtrlCreateCheckbox("L:", 128, 128, 33, 17) $Checkbox13 = GUICtrlCreateCheckbox("M:", 168, 128, 33, 17) $Checkbox14 = GUICtrlCreateCheckbox("N:", 208, 128, 33, 17) $Checkbox15 = GUICtrlCreateCheckbox("O:", 248, 128, 33, 17) $Checkbox16 = GUICtrlCreateCheckbox("P:", 288, 128, 33, 17) $Checkbox17 = GUICtrlCreateCheckbox("Q:", 328, 128, 33, 17) $Checkbox18 = GUICtrlCreateCheckbox("R:", 368, 128, 33, 17) $Checkbox19 = GUICtrlCreateCheckbox("S:", 88, 160, 33, 17) $Checkbox20 = GUICtrlCreateCheckbox("T:", 128, 160, 33, 17) $Checkbox21 = GUICtrlCreateCheckbox("U:", 168, 160, 33, 17) $Checkbox22 = GUICtrlCreateCheckbox("V:", 208, 160, 33, 17) $Checkbox23 = GUICtrlCreateCheckbox("W:", 248, 160, 33, 17) $Checkbox24 = GUICtrlCreateCheckbox("X:", 288, 160, 33, 17) $Checkbox25 = GUICtrlCreateCheckbox("Y:", 328, 160, 33, 17) $Checkbox26 = GUICtrlCreateCheckbox("Z:", 368, 160, 33, 17) $Group1 = GUICtrlCreateGroup("choose driver", 48, 32, 369, 177) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("start installation", 128, 224, 193, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ShellExecute("dfstd.exe", "/install /freeze:C,D,...") ; i want write checking box (C,D...) Link to comment Share on other sites More sharing options...
gruntydatsun Posted October 14, 2013 Share Posted October 14, 2013 _GUICtrlButton_GetCheck Link to comment Share on other sites More sharing options...
BrewManNH Posted October 14, 2013 Share Posted October 14, 2013 This is how I would do it, not sure on your ShellExecute line as I don't know what it is you're trying to run with it so I just copied your line. expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 486, 275, 192, 124) Global $Checkbox[27][2] For $Loop = 0 To 1 $Checkbox[$Loop + 1][0] = GUICtrlCreateCheckbox(Chr($Loop + 67) & ":", 88 + ($Loop * 40), 64, 33, 17) $Checkbox[$Loop + 1][1] = Chr($Loop + 67) & ":" Next For $Loop = 1 To 8 If $Loop < 3 Then $Checkbox[$Loop + 2][0] = GUICtrlCreateCheckbox(Chr($Loop + 64) & ":", 88 + (($Loop - 1) * 40), 96, 33, 17) $Checkbox[$Loop + 2][1] = Chr($Loop + 64) & ":" Else $Checkbox[$Loop + 2][0] = GUICtrlCreateCheckbox(Chr($Loop + 66) & ":", 88 + (($Loop - 1) * 40), 96, 33, 17) $Checkbox[$Loop + 2][1] = Chr($Loop + 66) & ":" EndIf Next For $Loop = 1 To 8 $Checkbox[$Loop + 10][0] = GUICtrlCreateCheckbox(Chr($Loop + 74) & ":", 88 + (($Loop - 1) * 40), 128, 33, 17) $Checkbox[$Loop + 10][1] = Chr($Loop + 74) & ":" Next For $Loop = 1 To 8 $Checkbox[$Loop + 18][0] = GUICtrlCreateCheckbox(Chr($Loop + 82) & ":", 88 + (($Loop - 1) * 40), 160, 33, 17) $Checkbox[$Loop + 18][1] = Chr($Loop + 82) & ":" Next $Group1 = GUICtrlCreateGroup("choose driver", 48, 32, 369, 177) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("start installation", 128, 224, 193, 33) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $Count = 1 To 26 If GUICtrlRead($Checkbox[$Count][0]) = $GUI_CHECKED Then ShellExecute("dfstd.exe", "/install /freeze:" & $Checkbox[$Count][1]) EndIf Next EndSwitch WEnd ;~ ShellExecute("dfstd.exe", "/install /freeze:C,D,...") ; i want write checking box (C,D...) If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
bybordo Posted October 14, 2013 Author Share Posted October 14, 2013 Â This is how I would do it, not sure on your ShellExecute line as I don't know what it is you're trying to run with it so I just copied your line. expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 486, 275, 192, 124) Global $Checkbox[27][2] For $Loop = 0 To 1 $Checkbox[$Loop + 1][0] = GUICtrlCreateCheckbox(Chr($Loop + 67) & ":", 88 + ($Loop * 40), 64, 33, 17) $Checkbox[$Loop + 1][1] = Chr($Loop + 67) & ":" Next For $Loop = 1 To 8 If $Loop < 3 Then $Checkbox[$Loop + 2][0] = GUICtrlCreateCheckbox(Chr($Loop + 64) & ":", 88 + (($Loop - 1) * 40), 96, 33, 17) $Checkbox[$Loop + 2][1] = Chr($Loop + 64) & ":" Else $Checkbox[$Loop + 2][0] = GUICtrlCreateCheckbox(Chr($Loop + 66) & ":", 88 + (($Loop - 1) * 40), 96, 33, 17) $Checkbox[$Loop + 2][1] = Chr($Loop + 66) & ":" EndIf Next For $Loop = 1 To 8 $Checkbox[$Loop + 10][0] = GUICtrlCreateCheckbox(Chr($Loop + 74) & ":", 88 + (($Loop - 1) * 40), 128, 33, 17) $Checkbox[$Loop + 10][1] = Chr($Loop + 74) & ":" Next For $Loop = 1 To 8 $Checkbox[$Loop + 18][0] = GUICtrlCreateCheckbox(Chr($Loop + 82) & ":", 88 + (($Loop - 1) * 40), 160, 33, 17) $Checkbox[$Loop + 18][1] = Chr($Loop + 82) & ":" Next $Group1 = GUICtrlCreateGroup("choose driver", 48, 32, 369, 177) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("start installation", 128, 224, 193, 33) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $Count = 1 To 26 If GUICtrlRead($Checkbox[$Count][0]) = $GUI_CHECKED Then ShellExecute("dfstd.exe", "/install /freeze:" & $Checkbox[$Count][1]) EndIf Next EndSwitch WEnd ;~ ShellExecute("dfstd.exe", "/install /freeze:C,D,...") ; i want write checking box (C,D...) thx sir. and i have 1 more question. i want it : ShellExecute("dfstd.exe", "/install /pw:blabla /freeze:" & $Checkbox[$Count][1]) ; i want write pw: there ("write password" in image) Link to comment Share on other sites More sharing options...
BrewManNH Posted October 14, 2013 Share Posted October 14, 2013 I'm afraid I don't know what it is you're asking. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
bybordo Posted October 14, 2013 Author Share Posted October 14, 2013 (edited) I'm afraid I don't know what it is you're asking. can you see "write password" in the image ? i write there my password. and script must write there: ShellExecute("dfstd.exe", "/install /pw:blabla /freeze:" & $Checkbox[$Count][1]) ; blabla is my password Edited October 14, 2013 by bybordo Link to comment Share on other sites More sharing options...
BrewManNH Posted October 14, 2013 Share Posted October 14, 2013 So what is stopping you from changing the line to include your password? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
bybordo Posted October 14, 2013 Author Share Posted October 14, 2013 (edited) So what is stopping you from changing the line to include your password? Nothing. i am trying to say it: my password must written to my installation parameter. example: ShellExecute("dfstd.exe", "/install /pw:mypass /freeze:" & $Checkbox[$Count][1]) ; mypass will writtene when i press "start installation" button. same freeze:C,D example Edited October 14, 2013 by bybordo Link to comment Share on other sites More sharing options...
BrewManNH Posted October 14, 2013 Share Posted October 14, 2013 Change the section of code under the Case $Button to this. Case $Button1 For $Count = 1 To 26 If GUICtrlRead($Checkbox[$Count][0]) = $GUI_CHECKED Then $sDrives &= $Checkbox[$Count][1] & "," EndIf Next $sDrives = StringTrimRight($sDrives, 1) ShellExecute("dfstd.exe", "/pw:mypass /install /freeze:" & $sDrives) This should pass your password and a string of drive letters to freeze depending on which checkboxes are checked. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
bybordo Posted October 14, 2013 Author Share Posted October 14, 2013 Change the section of code under the Case $Button to this. Case $Button1 For $Count = 1 To 26 If GUICtrlRead($Checkbox[$Count][0]) = $GUI_CHECKED Then $sDrives &= $Checkbox[$Count][1] & "," EndIf Next $sDrives = StringTrimRight($sDrives, 1) ShellExecute("dfstd.exe", "/pw:mypass /install /freeze:" & $sDrives) This should pass your password and a string of drive letters to freeze depending on which checkboxes are checked. How can write my password to shellexecute line ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 14, 2013 Moderators Share Posted October 14, 2013 bybordo,Read the input you use to enter the password and then add it into the line like this:ShellExecute("dfstd.exe", "/pw:" & GUICtrlRead($cInput) & " /install /freeze:" & $sDrives)I have assumed that the edit has its ControlID stored in the $cInput variable - you do not actually have an input in the code you posted. M23  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
bybordo Posted October 14, 2013 Author Share Posted October 14, 2013 expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 486, 275, 192, 124) Global $Checkbox[27][2] For $Loop = 0 To 1 $Checkbox[$Loop + 1][0] = GUICtrlCreateCheckbox(Chr($Loop + 67) & ":", 88 + ($Loop * 40), 64, 33, 17) $Checkbox[$Loop + 1][1] = Chr($Loop + 67) & ":" Next For $Loop = 1 To 8 If $Loop < 3 Then $Checkbox[$Loop + 2][0] = GUICtrlCreateCheckbox(Chr($Loop + 64) & ":", 88 + (($Loop - 1) * 40), 96, 33, 17) $Checkbox[$Loop + 2][1] = Chr($Loop + 64) & ":" Else $Checkbox[$Loop + 2][0] = GUICtrlCreateCheckbox(Chr($Loop + 66) & ":", 88 + (($Loop - 1) * 40), 96, 33, 17) $Checkbox[$Loop + 2][1] = Chr($Loop + 66) & ":" EndIf Next For $Loop = 1 To 8 $Checkbox[$Loop + 10][0] = GUICtrlCreateCheckbox(Chr($Loop + 74) & ":", 88 + (($Loop - 1) * 40), 128, 33, 17) $Checkbox[$Loop + 10][1] = Chr($Loop + 74) & ":" Next For $Loop = 1 To 8 $Checkbox[$Loop + 18][0] = GUICtrlCreateCheckbox(Chr($Loop + 82) & ":", 88 + (($Loop - 1) * 40), 160, 33, 17) $Checkbox[$Loop + 18][1] = Chr($Loop + 82) & ":" Next $Group1 = GUICtrlCreateGroup("choose driver", 48, 32, 369, 177) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("start installation", 128, 224, 193, 33) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $Count = 1 To 26 If GUICtrlRead($Checkbox[$Count][0]) = $GUI_CHECKED Then $sDrives &= $Checkbox[$Count][1] & "," ShellExecute("dfstd.exe", "/pw:" & GUICtrlRead($cInput) & " /install /freeze:" & $sDrives) EndIf Next $sDrives = StringTrimRight($sDrives, 1) EndSwitch WEnd where is worng Link to comment Share on other sites More sharing options...
BrewManNH Posted October 14, 2013 Share Posted October 14, 2013 You don't have an input control assigned to $cInput. Melba23 did explain that you have to have an input to be able to put your password into one before you can put it into your ShellExecute line If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
bybordo Posted October 14, 2013 Author Share Posted October 14, 2013 (edited) You don't have an input control assigned to $cInput. Melba23 did explain that you have to have an input to be able to put your password into one before you can put it into your ShellExecute line it is complicated for me. this is my first form. can you edit for me ? expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1_1 = GUICreate("Form1", 474, 343, 194, 124) $Checkbox1 = GUICtrlCreateCheckbox("C:", 88, 64, 33, 17) $Checkbox2 = GUICtrlCreateCheckbox("D:", 128, 64, 33, 17) $Checkbox3 = GUICtrlCreateCheckbox("A:", 88, 96, 33, 17) $Checkbox4 = GUICtrlCreateCheckbox("B:", 128, 96, 33, 17) $Checkbox5 = GUICtrlCreateCheckbox("E:", 168, 96, 33, 17) $Checkbox6 = GUICtrlCreateCheckbox("F:", 208, 96, 33, 17) $Checkbox7 = GUICtrlCreateCheckbox("G:", 248, 96, 33, 17) $Checkbox8 = GUICtrlCreateCheckbox("H:", 288, 96, 33, 17) $Checkbox9 = GUICtrlCreateCheckbox("I:", 328, 96, 33, 17) $Checkbox10 = GUICtrlCreateCheckbox("J:", 368, 96, 33, 17) $Checkbox11 = GUICtrlCreateCheckbox("K:", 88, 128, 33, 17) $Checkbox12 = GUICtrlCreateCheckbox("L:", 128, 128, 33, 17) $Checkbox13 = GUICtrlCreateCheckbox("M:", 168, 128, 33, 17) $Checkbox14 = GUICtrlCreateCheckbox("N:", 208, 128, 33, 17) $Checkbox15 = GUICtrlCreateCheckbox("O:", 248, 128, 33, 17) $Checkbox16 = GUICtrlCreateCheckbox("P:", 288, 128, 33, 17) $Checkbox17 = GUICtrlCreateCheckbox("Q:", 328, 128, 33, 17) $Checkbox18 = GUICtrlCreateCheckbox("R:", 368, 128, 33, 17) $Checkbox19 = GUICtrlCreateCheckbox("S:", 88, 160, 33, 17) $Checkbox20 = GUICtrlCreateCheckbox("T:", 128, 160, 33, 17) $Checkbox21 = GUICtrlCreateCheckbox("U:", 168, 160, 33, 17) $Checkbox22 = GUICtrlCreateCheckbox("V:", 208, 160, 33, 17) $Checkbox23 = GUICtrlCreateCheckbox("W:", 248, 160, 33, 17) $Checkbox24 = GUICtrlCreateCheckbox("X:", 288, 160, 33, 17) $Checkbox25 = GUICtrlCreateCheckbox("Y:", 328, 160, 33, 17) $Checkbox26 = GUICtrlCreateCheckbox("Z:", 368, 160, 33, 17) $Group1 = GUICtrlCreateGroup("choose driver", 48, 32, 369, 177) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("start installation", 136, 296, 177, 25) GUICtrlCreateInput("", 64, 248, 329, 21) $Group2 = GUICtrlCreateGroup("set password", 48, 224, 369, 57) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ShellExecute("dfstd.exe", "/pw:" & GUICtrlRead($cInput) & " /install /freeze:" & $sDrives); it is melba's example Edited October 14, 2013 by bybordo Link to comment Share on other sites More sharing options...
BrewManNH Posted October 14, 2013 Share Posted October 14, 2013 I already did 99% of the work, I'll leave the last 1% to you. Open the help file, read the section on GUICtrlCreateInput, run the example script in that section. figure out what each line of the code is for and doing, and add it to your script. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
bybordo Posted October 14, 2013 Author Share Posted October 14, 2013 expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 486, 275, 192, 124) Global $Checkbox[27][2] For $Loop = 0 To 1 $Checkbox[$Loop + 1][0] = GUICtrlCreateCheckbox(Chr($Loop + 67) & ":", 88 + ($Loop * 40), 64, 33, 17) $Checkbox[$Loop + 1][1] = Chr($Loop + 67) & ":" Next For $Loop = 1 To 8 If $Loop < 3 Then $Checkbox[$Loop + 2][0] = GUICtrlCreateCheckbox(Chr($Loop + 64) & ":", 88 + (($Loop - 1) * 40), 96, 33, 17) $Checkbox[$Loop + 2][1] = Chr($Loop + 64) & ":" Else $Checkbox[$Loop + 2][0] = GUICtrlCreateCheckbox(Chr($Loop + 66) & ":", 88 + (($Loop - 1) * 40), 96, 33, 17) $Checkbox[$Loop + 2][1] = Chr($Loop + 66) & ":" EndIf Next For $Loop = 1 To 8 $Checkbox[$Loop + 10][0] = GUICtrlCreateCheckbox(Chr($Loop + 74) & ":", 88 + (($Loop - 1) * 40), 128, 33, 17) $Checkbox[$Loop + 10][1] = Chr($Loop + 74) & ":" Next For $Loop = 1 To 8 $Checkbox[$Loop + 18][0] = GUICtrlCreateCheckbox(Chr($Loop + 82) & ":", 88 + (($Loop - 1) * 40), 160, 33, 17) $Checkbox[$Loop + 18][1] = Chr($Loop + 82) & ":" Next $Group1 = GUICtrlCreateGroup("choose driver", 48, 32, 369, 177) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("start installation", 128, 224, 193, 33) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### GUICtrlCreateInput("", 64, 248, 329, 21) $Group2 = GUICtrlCreateGroup("set password", 48, 224, 369, 57) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $Count = 1 To 26 If GUICtrlRead($Checkbox[$Count][0]) = $GUI_CHECKED Then ShellExecute("dfstd.exe", "/pw:" & GUICtrlRead($Group2) & " /install /freeze:" & $Checkbox[$Count][1]) EndIf Next EndSwitch WEnd is it true ? and 1 more question. how i can open this script with koda designer ? Link to comment Share on other sites More sharing options...
BrewManNH Posted October 15, 2013 Share Posted October 15, 2013 I have no idea how you'd open it in Koda, I rarely if ever used it for anything other than aligning controls, and haven't used it in years. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
bybordo Posted October 15, 2013 Author Share Posted October 15, 2013 (edited) I have no idea how you'd open it in Koda, I rarely if ever used it for anything other than aligning controls, and haven't used it in years. i tried this but it is worng. for example i choose c,d, e script does ShellExecute("dfstd.exe", "/pw:" & GUICtrlRead($Group2) & " /install /freeze=C) ShellExecute("dfstd.exe", "/pw:" & GUICtrlRead($Group2) & " /install /freeze=D) ShellExecute("dfstd.exe", "/pw:" & GUICtrlRead($Group2) & " /install /freeze=E) i don't want it. i want this: ShellExecute("dfstd.exe", "/pw:" & GUICtrlRead($Group2) & " /install /freeze=C,D,E) Edited October 15, 2013 by bybordo Link to comment Share on other sites More sharing options...
Starstar Posted October 15, 2013 Share Posted October 15, 2013 (edited) bybordo why are you not adding a Browse input box instead of so many check buttons? Like this script Check this one please..... i have pasted incomplete script for your convenience.Complete script also confirm client username and password from mikrotik server. expandcollapse popup#NoTrayIcon #compiler_icon=itlifesaver.ico #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <process.au3> #include <File.au3> $COMPANY_NAME = "HM-LINK" ; name of the pppoe icon, friendly description $COMPANY_NAMEnu = "HM-LINK 03216592390" $SERVICE_NAME = "HM" ; name of the pppoe service configured in NAS/Mikrotik $NUM = "03216592390" Local $font $timeout = 00 ;Restart TimeOut $DELAY = 300 $Soft = "HM LogIn" $Name = "Adnan Kashif AbdulRauf Haris" Local $PathSc = _PathFull(@ScriptFullPath) $dir = _PathFull(@ScriptDir) $frmInformation = GUICreate($COMPANY_NAME, 287, 230, 193, 115) GUICtrlSetDefColor(0x006400) GUICtrlSetDefBkColor(0xeee8aa) $lblUserName = GUICtrlCreateLabel("User Name:", 16, 42, 60, 17) $lblPassword = GUICtrlCreateLabel("Password:", 16, 83, 53, 17) $txtUserName = GUICtrlCreateInput("", 112, 40, 153, 21) Dim $ES_PA, $ES_AU $txtPassword = GUICtrlCreateInput("", 112, 80, 153, 21, BitOR($ES_PA, $ES_AU)) $lblPassword2 = GUICtrlCreateLabel("Confirm Password:", 16, 122, 91, 17) $txtPassword2 = GUICtrlCreateInput("", 112, 120, 153, 21, BitOR($ES_PA, $ES_AU)) $btnOK = GUICtrlCreateButton("&GO!", 208, 200, 68, 25, 0) GUICtrlSetCursor($btnOK, 0) $btnbrw = GUICtrlCreateButton("&Browse", 208, 163, 68, 25, 0) GUICtrlSetCursor($btnbrw, 0) $txtbrw = GUICtrlCreateInput($PathSc, 112, 164, 85, 21) $lblbrw = GUICtrlCreateLabel("Select HM Icon :", 16, 166, 90, 17) $lblInfo = GUICtrlCreateLabel("Enter your " & $Soft & " Information!", 16, 8, 250, 20) GUICtrlSetFont($lblInfo, 10, 800) GUICtrlSetColor($lblInfo, 0xff0000) ; Red $lblInfo3 = GUICtrlCreateLabel($Name, 16, 204, 186, 80) GUICtrlSetFont($lblInfo3, 9, 800) GUICtrlSetColor($lblInfo3, 0x9370db) GUISetState(@SW_SHOW) While 1 $uMsg = GUIGetMsg() Switch $uMsg Case $btnbrw Local $message = "You can Choose Hm Soft Log_In only." ;See if company name change....................................................... Local $var = FileOpenDialog($message, @ScriptDir & "\", "Icon (*.Ico;*.exe)", 1 + 4) If @error Then MsgBox(0, $COMPANY_NAMEnu, "No Icon chosen") Else $var = StringReplace($var, "|", @CRLF) EndIf ControlSetText($COMPANY_NAME, "", "[CLASS:Edit; ID:11]", $var) Case $btnOK If GUICtrlRead($txtPassword) <> GUICtrlRead($txtPassword2) Then MsgBox(16, "Error " & $NUM, "Passwords do not match! Try again.") Else $Username = GUICtrlRead($txtUserName) If StringLen($Username) = 0 Then MsgBox(64, $COMPANY_NAMEnu, "Plese Enter Your Username.") Else $Password = GUICtrlRead($txtPassword) If StringLen($Password) = 0 Then MsgBox(64, $COMPANY_NAMEnu, "Plese Enter Your Passwords.") Else $txtbrwr = GUICtrlRead($txtbrw) If StringLen($txtbrwr) = 0 Then MsgBox(64, $COMPANY_NAMEnu, "Please Choose " & $Soft & ".EXE") Else $txtbrwr = GUICtrlRead($txtbrw) If String($txtbrwr) <> ($PathSc) Then MsgBox(64, $COMPANY_NAMEnu, "You Can Choose " & $Soft & ".EXE Only.") Else $Username = GUICtrlRead($txtUserName) $Password = GUICtrlRead($txtPassword) $txtbrwr = GUICtrlRead($txtbrw) ExitLoop EndIf EndIf EndIf EndIf EndIf Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd GUISetState(@SW_HIDE) Sleep(300) Edited October 15, 2013 by adnanbaloch Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
bybordo Posted October 15, 2013 Author Share Posted October 15, 2013 i need 26 cehck box. i can't insert to your script. 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