tbaror Posted October 6, 2007 Share Posted October 6, 2007 hi ,i am looking to a way to capute the output of RUN command and show it in GUICtrlCreateEdit box.please advisetHanks Link to comment Share on other sites More sharing options...
BrettF Posted October 6, 2007 Share Posted October 6, 2007 hi , i am looking to a way to capute the output of RUN command and show it in GUICtrlCreateEdit box. please advise tHanks #include <GUIConstants.au3> #Include <GuiEdit.au3> Opt ("RunErrorsFatal", 0) $GUI = GUICreate ("Run Output", 400, 200) $Btn_Run = GUICtrlCreateButton ("Run Program", 300, 0, 100, 27) $txt_edit = GUICtrlCreateEdit ("", 0, 0, 300, 200) GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg () Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Btn_Run $file = FileOpenDialog ("Open...", "", ".exe (*.exe)") $run = _RunFile ($file) GUICtrlSetState ($txt_edit, $GUI_FOCUS) _GUICtrlEditReplaceSel ($txt_edit, False, $run) EndSelect WEnd Func _RunFile ($file) $rtn = Run ($file) $time = @HOUR & ":" & @MIN & ":" & @SEC If @error = 1 Then $def = "1- The EXE file could not be located." Else $def = "0- Success" EndIf $msg = "["&$time&"]>> RUN COMMAND: "&@CRLF&@TAB&"RUNNING '"&$file&"'"&@CRLF& _ @TAB & "RETURNED: " & $def Return $msg EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
GaryFrost Posted October 6, 2007 Share Posted October 6, 2007 Using the latest beta: #include <GUIConstants.au3> #Include <GuiEdit.au3> Opt ("RunErrorsFatal", 0) $GUI = GUICreate ("Run Output", 400, 200) $Btn_Run = GUICtrlCreateButton ("Run Program", 300, 0, 100, 27) $txt_edit = GUICtrlCreateEdit ("", 0, 0, 300, 200) GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg () Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Btn_Run $file = FileOpenDialog ("Open...", "", ".exe (*.exe)") $run = _RunFile ($file) _GUICtrlEdit_AppendText($txt_edit, $run) EndSelect WEnd Func _RunFile ($file) $rtn = Run ($file) $time = @HOUR & ":" & @MIN & ":" & @SEC If @error = 1 Then $def = "1- The EXE file could not be located." Else $def = "0- Success" EndIf $msg = "["&$time&"]>> RUN COMMAND: "&@CRLF&@TAB&"RUNNING '"&$file&"'"&@CRLF& _ @TAB & "RETURNED: " & $def Return $msg EndFunc 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...
BrettF Posted October 6, 2007 Share Posted October 6, 2007 Using the latest beta: #include <GUIConstants.au3> #Include <GuiEdit.au3> Opt ("RunErrorsFatal", 0) $GUI = GUICreate ("Run Output", 400, 200) $Btn_Run = GUICtrlCreateButton ("Run Program", 300, 0, 100, 27) $txt_edit = GUICtrlCreateEdit ("", 0, 0, 300, 200) GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg () Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Btn_Run $file = FileOpenDialog ("Open...", "", ".exe (*.exe)") $run = _RunFile ($file) _GUICtrlEdit_AppendText($txt_edit, $run) EndSelect WEnd Func _RunFile ($file) $rtn = Run ($file) $time = @HOUR & ":" & @MIN & ":" & @SEC If @error = 1 Then $def = "1- The EXE file could not be located." Else $def = "0- Success" EndIf $msg = "["&$time&"]>> RUN COMMAND: "&@CRLF&@TAB&"RUNNING '"&$file&"'"&@CRLF& _ @TAB & "RETURNED: " & $def Return $msg EndFuncAhhhhhhhh... Remind me to download the latest beta... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
GaryFrost Posted October 6, 2007 Share Posted October 6, 2007 Ahhhhhhhh... Remind me to download the latest beta... Download the latest beta 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...
BrettF Posted October 6, 2007 Share Posted October 6, 2007 Done Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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