Sign in to follow this  
Followers 0
MadaraUchiha

Command Prompt

46 posts in this topic

Hey,

I like to code a little Command prompt Tool.

So I enter a command like dir C:UsersDomiDesktop and in the Edit Component

it should display the output. So it should read the cmd output and display it in the edit component.

Thats how far I am:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>


$Form1 = GUICreate("Cmd", 399, 277, 192, 124)
$Edit = GUICtrlCreateEdit("", 8, 16, 369, 217)
$Button1 = GUICtrlCreateButton("Send", 16, 240, 75, 25)
$Input1 = GUICtrlCreateInput("", 96, 245, 289, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            Global $DOS, $Message = ''
            $DOS = Run(@ComSpec & " " & GuiCtrlRead($Input1), "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
            ProcessWaitClose($DOS)
            $Message = StdoutRead($DOS)
            GUICtrlSetData($Edit,GUICtrlRead($Edit) & @LF & $Message)
    EndSwitch
WEnd

8ca3kiyb.png

But it doesn't display me the outcome?

Why? :s


Share this post


Link to post
Share on other sites



I changed this line and it works for me:

$DOS = Run(@ComSpec & " /c " & GuiCtrlRead($Input1), "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Not having something before the command would always cause the Run to not display anything. As water pointed out, adding " /c " before the command, it works. Not sure why, but if it works with it, then I'd have to include it.


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 Gude
How 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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hm, I am so far:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>

$Form1 = GUICreate("Command Prompt", 491, 318, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$DS_MODALFRAME))
$Console = GUICtrlCreateEdit("", 8, 8, 473, 265, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL, $ES_READONLY))
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$Button1 = GUICtrlCreateButton("Execute", 8, 282, 75, 25)
$Input1 = GUICtrlCreateInput("", 88, 285, 393, 21)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)



Func RemoteConsole($CommandToSend)
 $Cmd =  Run(@ComSpec & " /c" & $CommandToSend, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
StdinWrite($Cmd,GUICtrlRead($CommandToSend))
StdinWrite($Cmd,@CRLF)
Local $data
Sleep(110)
$data &= StdoutRead($Cmd)
GUICtrlSetData($Console,$data & @LF)
StdinWrite($Cmd,@CRLF)
$data &= StdoutRead($Cmd)
ConsoleWrite($data & @LF)

EndFunc

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            RemoteConsole(GUICtrlRead($Input1))

    EndSwitch

WEnd

Some commands like Dir C: work others like ipconfig or tasklist doesn't.

Also it does not show the copyright? Why? ;o

Edited by MadaraUchiha

Share this post


Link to post
Share on other sites

Also it does not show the copyright? Why? ;o

Which copyright? Can you post an example?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

@water:

p6rn2q8h.png

But why it recognizes some commands and other it doesn't ? O_o


Share this post


Link to post
Share on other sites

It displayed the results from IPCONFIG and tasklist for me.


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 Gude
How 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

Share this post


Link to post
Share on other sites

Couple of things:

Why are you sending the command both on the command line and via STDWRITE?

 

$Cmd =  Run(@ComSpec & " /c" & $CommandToSend, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
StdinWrite($Cmd,GUICtrlRead($CommandToSend))

 

There is also a Space missing after "/c"

You are potentially not reading all STDOUT info and not reading STDERR at all.

Maybe some more reading of the helpfile is in order?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hm, I cleaned up my Script a bit and also I've added the missing space as @Jos told me.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>

$Form1 = GUICreate("Command Prompt", 491, 318, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$DS_MODALFRAME))
$Console = GUICtrlCreateEdit("", 8, 8, 473, 265, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL, $ES_READONLY))
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$Button1 = GUICtrlCreateButton("Execute", 8, 282, 75, 25)
$Input1 = GUICtrlCreateInput("", 88, 285, 393, 21)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)



Func RemoteConsole($CommandToSend)
$Cmd =  Run(@ComSpec & " /c " & $CommandToSend & @CRLF, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Local $data
Sleep(100)
$data &= StdoutRead($Cmd)
GUICtrlSetData($Console,$data & @LF)
ConsoleWrite($data & @LF)
EndFunc

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            RemoteConsole(GUICtrlRead($Input1))
    EndSwitch

WEnd

Another thing which confuses me, if i send garbage text, it doesn't tell me unknow command like normal cmd does?


Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Since this is active, I'll ask my question in here.
So I've got my script here:

#include <ButtonConstants.au3>
#include <Constants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <ScrollBarsConstants.au3>

Opt("GUIOnEventMode", 1)
Global $sCurrentCommand
Global $hGUI = GUICreate("Cmd", 489, 277, 192, 124)
Global $hEdit1 = GUICtrlCreateEdit("", 8, 16, 469, 217, BitOR($GUI_SS_DEFAULT_EDIT, $ES_READONLY))
GUICtrlSetBkColor($hEdit1, 0x000000)
GUICtrlSetColor($hEdit1, 0xFFFFFF)
Global $hButton1 = GUICtrlCreateButton("Execute", 16, 240, 75, 25, BitOR($GUI_SS_DEFAULT_BUTTON, $BS_DEFPUSHBUTTON))
Global $hInput1 = GUICtrlCreateInput(FileRead(@AutoItExe & ":lastcommand"), 96, 245, 289, 21)
GUICtrlSetOnEvent($hButton1, "_RunCommand")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetState(@SW_SHOW)

Func _RunCommand()
    Local $hInputCommand = GUICtrlRead($hInput1)
    Local $hDOS = Run(@ComSpec & " /c " & $hInputCommand, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

    GUICtrlSetData($hEdit1, GUICtrlRead($hEdit1) & @CRLF & 'Command: "' & $hInputCommand & '"' & @CRLF & "{")
    Do
        Local $sStdOut = StdoutRead($hDOS)
        Local $sStdErr = StderrRead($hDOS)
        If $sStdOut <> '' Then
            GUICtrlSetData($hEdit1, GUICtrlRead($hEdit1) & @CRLF & $sStdOut)
            _GUICtrlEdit_Scroll($hEdit1, $SB_SCROLLCARET)
        EndIf
        If $sStdErr <> '' Then
            GUICtrlSetData($hEdit1, GUICtrlRead($hEdit1) & @CRLF & $sStdErr)
            _GUICtrlEdit_Scroll($hEdit1, $SB_SCROLLCARET)
        EndIf
    Until ProcessExists($hDOS) == 0
    
    GUICtrlSetData($hEdit1, GUICtrlRead($hEdit1) & @CRLF & "}" & ' ;==> "' & $hInputCommand & '"' & @CRLF)
    _GUICtrlEdit_Scroll($hEdit1, $SB_SCROLLCARET)
    $sCurrentCommand = $hInputCommand
EndFunc   ;==>_RunCommand

Func _Exit()
    DllCall("kernel32.dll", "int", "DeleteFileW", "wstr", @AutoItExe & ":lastcommand")
    FileWrite(@AutoItExe & ":lastcommand", $sCurrentCommand)
    Exit
EndFunc   ;==>_Exit

While 1
    Sleep(100)
WEnd

But this also skips the Copyright part, if possible how could I grep that?

EDIT:
This also skips "öüä" in the output. How should I go about fixing that?

Edited by Jonniy

Thanks for your help & have a good day. Yours sincerely, -Jonniy-  

Share this post


Link to post
Share on other sites

Okay, I was able to fix the part with the error displaying:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>

$Form1 = GUICreate("Command Prompt", 491, 318, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$DS_MODALFRAME))
$Console = GUICtrlCreateEdit("", 8, 8, 473, 265, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL, $ES_READONLY))
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$Button1 = GUICtrlCreateButton("Execute", 8, 282, 75, 25)
$Input1 = GUICtrlCreateInput("", 88, 285, 393, 21)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)


Func RemoteConsole($CommandToSend)
$Cmd =  Run(@ComSpec & " /c " & $CommandToSend & @CRLF, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Sleep(200)
Local $sStdOut = StdoutRead($Cmd)
Local $sStdErr = StderrRead($Cmd)

If $sStdOut <> '' Then
    GUICtrlSetData($Console,$sStdOut & @LF)
    ConsoleWrite($sStdOut & @LF)
Else
    GUICtrlSetData($Console,$sStdErr & @LF)
    ConsoleWrite($sStdErr & @LF)
EndIf
EndFunc

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            RemoteConsole(GUICtrlRead($Input1))
    EndSwitch

WEnd

But still, I have no clue how to get the Copyright?


Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

...slightly modified...

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <GuiEdit.au3>
$Form1 = GUICreate("Command Prompt", 491, 318, 192, 124, BitOR($GUI_SS_DEFAULT_GUI, $DS_MODALFRAME))
$Console = GUICtrlCreateEdit("", 8, 8, 473, 265, BitOR($ES_AUTOVSCROLL, $ES_WANTRETURN, $WS_VSCROLL, $ES_READONLY))
GUICtrlSetColor(-1, 0x00FF00) ; color of font (green)
GUICtrlSetBkColor(-1, 0x000000) ; Color of background (black)
GUICtrlSetFont(-1, 9, 0, 0, "Lucida Console")
$Button1 = GUICtrlCreateButton("Execute", 8, 282, 75, 25)
$Input1 = GUICtrlCreateInput("", 88, 285, 393, 21)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)
; here we start a hidden DOS prompt to be used when needed (it remains alive becouse of /K parameter)
Global $CMD = Run(@ComSpec & " /K", "", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD + $STDERR_CHILD + $STDERR_MERGED)
Func RemoteConsole() ; $CommandToSend)
    Local $sStdOut = StdoutRead($CMD)
    If $sStdOut <> '' Then
        _GUICtrlEdit_AppendText($Console, $sStdOut)
    EndIf
EndFunc   ;==>RemoteConsole

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            GUICtrlSetData($Console, "") ; clear console screen
            StdinWrite($CMD, GUICtrlRead($Input1) & @CRLF)
    EndSwitch
    RemoteConsole()
WEnd
Edited by PincoPanco

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

Using the run command like you are, you won't get the copyright messages. Try typing this in the Run box in the Window's start menu and you will see that you get the same text in the test.txt file as you do in your edit box.
 

%comspec% /k dir c:\ >c:\temp\test.txt

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 Gude
How 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

Share this post


Link to post
Share on other sites

Since this is active, I'll ask my question in here.

 

Please don't post your own question in a thread that is active for another member.  This will only lead to confusion.

Thanks,

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Okay, I was able to fix the part with the error displaying:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>

$Form1 = GUICreate("Command Prompt", 491, 318, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$DS_MODALFRAME))
$Console = GUICtrlCreateEdit("", 8, 8, 473, 265, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL, $ES_READONLY))
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$Button1 = GUICtrlCreateButton("Execute", 8, 282, 75, 25)
$Input1 = GUICtrlCreateInput("", 88, 285, 393, 21)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)


Func RemoteConsole($CommandToSend)
$Cmd =  Run(@ComSpec & " /c " & $CommandToSend & @CRLF, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Sleep(200)
Local $sStdOut = StdoutRead($Cmd)
Local $sStdErr = StderrRead($Cmd)

If $sStdOut <> '' Then
    GUICtrlSetData($Console,$sStdOut & @LF)
    ConsoleWrite($sStdOut & @LF)
Else
    GUICtrlSetData($Console,$sStdErr & @LF)
    ConsoleWrite($sStdErr & @LF)
EndIf
EndFunc

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            RemoteConsole(GUICtrlRead($Input1))
    EndSwitch

WEnd

But still, I have no clue how to get the Copyright?

You are still potentially not ready all STDOUT or STDERR output and only display one of the 2. Don't you want to display both?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

@Jos: Now I am confused... Output what? I can't get the point:s


Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

Also, I looked at PincoPanco's Sample.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <GuiEdit.au3>
$Form1 = GUICreate("Command Prompt", 491, 318, 192, 124, BitOR($GUI_SS_DEFAULT_GUI, $DS_MODALFRAME))
$Console = GUICtrlCreateEdit("", 8, 8, 473, 265, BitOR($ES_AUTOVSCROLL, $ES_WANTRETURN, $WS_VSCROLL, $ES_READONLY))
GUICtrlSetColor(-1, 0x00FF00) ; color of font (green)
GUICtrlSetBkColor(-1, 0x000000) ; Color of background (black)
GUICtrlSetFont(-1, 9, 0, 0, "Lucida Console")
$Button1 = GUICtrlCreateButton("Execute", 8, 282, 75, 25)
$Input1 = GUICtrlCreateInput("", 88, 285, 393, 21)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)
; here we start a hidden DOS prompt to be used when needed (it remains alive becouse of /K parameter)
Global $CMD = Run(@ComSpec & " /k", "", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD + $STDERR_CHILD + $STDERR_MERGED)
Func RemoteConsole() ; $CommandToSend)
    Local $sStdOut = StdoutRead($CMD)
    Local $sStdErr = StderrRead($Cmd)

    If $sStdOut <> '' Then
        _GUICtrlEdit_AppendText($Console, $sStdOut)
        MsgBox(0,'',$sStdOut)
    EndIf
      If $sStdErr <> '' Then
        _GUICtrlEdit_AppendText($Console, $sStdErr)
    EndIf
EndFunc   ;==>RemoteConsole

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            GUICtrlSetData($Console, "") ; clear console screen
            StdinWrite($CMD, GUICtrlRead($Input1) & @CRLF)
    EndSwitch
    RemoteConsole()
WEnd

It works fine, even if it does not display the copyright. It updates at runtime, but how can I grab the Ouput when all information got listed? like ping www.google.com.

It does 4 ping requests one appear after another.

and after all are made, i like them to show up in a messagebox.

Also, this Copyright thing seems parameter dependend? with /c it doesn't show up, but all commands are outputted fine, and with /k the copyright shows up but no output? O_o

Edited by MadaraUchiha

Share this post


Link to post
Share on other sites

Why do you want or need the copyright notice? What possible use can you have for it? 


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 Gude
How 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

Share this post


Link to post
Share on other sites

It looks more professonal. I can't understand why it won't output the copyright?

Also, I need to update the Edit Component at runtime, and after all data got listed, i want it to display in a messagebox.

(For example, after all ping requests were made or after netstat -a displayed all connections etc)


Share this post


Link to post
Share on other sites

The copyright notice is only there when you run the command prompt by itself, running a command with the command prompt won't display it, which makes sense because most of the time if you're running a command you want the command's output not cmd's.


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 Gude
How 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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0