Sign in to follow this  
Followers 0
Juanola

Command "Run" isn't working OK

2 posts in this topic

#1 ·  Posted (edited)

If I do in ms-dos:

c:\program\arj\arj.exe l c:\file\c2000.arj>list.txt <--- I working OK and create one file named list.txt with the list of files compressed in the file rar.

But if I do it script, the vars $STDERR_CHILD and $TDOUT_CHILD do not show anything and the file list isn't created!!!

#include <Constants.au3>
    
    Local $foo = Run(@ComSpec & " /c c:\program\arj\arj.exe l c:\file\c2000.arj>list.txt","c:\program\arj", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    Local $line
    While 1
        $line = StdoutRead($foo)
        If @error Then ExitLoop
        MsgBox(0, "STDOUT read:", $line)
    Wend

    While 1
        $line = StderrRead($foo)
        If @error Then ExitLoop
        MsgBox(0, "STDERR read:", $line)
    Wend

And if I do it other script it does not work either.

run ("c:\program\arj\arj.exe l c:\file\c2000.arj>list.txt","c:\program\arj",@SW_HIDE)

ANY HELP PLEASE?

:)

Edited by Juanola

Share this post


Link to post
Share on other sites



Simple Example,

$var = FileOpenDialog("", @ScriptDir & "\", "All (*.*)")
RunWait('"' & @ComSpec & '" /c ping Google.com' & $var & '>log.txt', '', @SW_HIDE)

;CMD "ping Google.com" do anything you wanna do !!
;$var your file "FileOpenDialog" "c2000.arj" !!

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