Jump to content

Command Prompt


Go to solution Solved by MHz,

Recommended Posts

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

Link to comment
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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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

Link to comment
Share on other sites

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

Link to comment
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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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?

Link to comment
Share on other sites

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-  

Link to comment
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?

Link to comment
Share on other sites

...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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Link to comment
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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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

Link to comment
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

Link to comment
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)

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...