Search the Community
Showing results for tags 'execute an item from combot'.
-
#include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 300, 200) $MSTSCPath = @SystemDir ;~ & "\MSTSC.exe" ; Create a combobox control. Local $iComboBox = GUICtrlCreateCombo("501", 10, 10, 185, 20) Local $iClose = GUICtrlCreateButton("Close", 210, 170, 85, 25) ; Add additional items to the combobox. GUICtrlSetData($iComboBox, "502|503", "504") ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) Local $sComboRead = "" ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iClose ExitLoop Case $iComboBox $sComboRead = GUICtrlRead($iComboBox) MsgBox($MB_SYSTEMMODAL, "", "The combobox is currently displaying: " & $sComboRead, 0, $hGUI) run($MSTSCPath & "MSTSC.exe" & " /admin /v:MGNET"& $iComboBox "-sv005") EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example I took the help script file to make a training before make my script -i got that combot list (try the script if you whant) with 3 item inside 501-502-503 i added that line (LINE:32) run($MSTSCPath & "MSTSC.exe" & " /admin /v:MGNET"& $iComboBox & "-sv005") what does i missing to do the cmd command in that "run" call MSTSC.exe /admin /v:MGNET501-sv005 The finality is to select the item 503 and when i click on it. I wanna run the associed item to connect on a server with that command MSTSC.exe /admin /v:MGNET503-sv005 hope i am clear xD cause my english is bad (sry)