Jump to content

sgrasso

Members
  • Posts

    3
  • Joined

  • Last visited

sgrasso's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. with some modifications it works, thanks! based on the choices made in the gui this will send those choices as variable to a second script and then execute. #include <GUIConstantsEx.au3> $b = True If $b = True Then FileInstall("C:\addtogroup.wsf", "C:\Temp\addtogroup.wsf") Opt("GUIOnEventMode", 1) Local $Btn, $Btn2 Local $hGUI, $Combo Local $msg Local $sCombo2test, $slp1text, $Combo2, $Input $hGUI = GUICreate("Add_User", 400, 400) $Combo = GUICtrlCreateCombo("server01", 10, 12, 200, 25) GUICtrlSetData(-1, "server02|server03") $Combo2 = GUICtrlCreateCombo("Administrators", 10, 124, 200, 25) GUICtrlSetData(-1, "Guests|Users") $Input=GuiCtrlCreateInput("domain/user", 10, 236, 200, 25) $Btn = GUICtrlCreateButton("ADD", 300, 24, 70, 50) $Btn2 = GUICtrlCreateButton("EXIT", 300, 284, 70, 50) GUICtrlSetOnEvent($Btn, "ADDButton") GUICtrlSetOnEvent($Btn2, "EXITButton") GUISetState() Func ADDButton() $sCombotext = GUICtrlRead($Combo) $sCombo2text = GUICtrlRead($Combo2) $slp1text = GUICtrlRead($Input) Run ("cmd.exe", @Systemdir, @SW_MINIMIZE) WinWait("[C:\WINDOWS\system32\cmd.exe]", "", 30) $sCombo2text & @CRLF & "Combo contains" & @CRLF & $sCombotext) ControlSend ("C:\WINDOWS\system32\cmd.exe","","","Cscript c:\Temp\addtogroup.wsf /s:" & $sCombotext & " /g:" & $sCombo2text & " /a:" & $slp1text & @CRLF) WinWait("[C:\WINDOWS\system32\cmd.exe]", "", 30) ControlSend ("C:\WINDOWS\system32\cmd.exe","","","EXIT" & @CRLF) EndFunc Func EXITButton() Exit EndFunc While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd
  2. is there a way to grab the value's chosen for combo box 1 , combo box 2 and the input box and insert them as the "string" parameter with ControlSend ?
  3. i would like to take the chosen value from two combo box's and one input box and pipe them into an external vb script i have created a basic gui with the combo boxes and input box and one button which ideally could start the process. any help would be appeciated. my autoit script #include <GUIConstantsEx.au3> Local $hGUI, $Combo, $Btn Local $msg $hGUI = GUICreate("Add_User", 400, 400) $Combo = GUICtrlCreateCombo("server01", 10, 12, 200, 25) GUICtrlSetData(-1, "server02|server03") $Combo2 = GUICtrlCreateCombo("Administrators", 10, 124, 200, 25) GUICtrlSetData(-1, "Guests|Users") GuiCtrlCreateInput("domain/user", 10, 236, 200, 25) $Btn = GUICtrlCreateButton("ADD", 300, 24, 70, 50) $Btn2 = GUICtrlCreateButton("EXIT", 300, 284, 70, 50) GUISetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd
×
×
  • Create New...