Sign in to follow this  
Followers 0
lhw

Can anyone do this?->Solved

5 posts in this topic

#1 ·  Posted (edited)

Hello, Does anybody can get output to a array from this line 'readcd -scanbus' without using a text file,here is the readcd,its opensource file from cdrecord tools without any harm, my barin doesn't work at the moment :unsure:, help is always appreciated.

Edit:alreasy tried via stdout and stderr with failure

Edited by lhw

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Always link to the official site you downloaded the tool from, hosting it on a file sharing site is asking for disaster / mistrust.

You might have gotten speedier help if you posted some code so others might point you in the right direction, but I am in a random act of kindness sort of mood so....

$_ = ""
$PH = Run("readcd.exe -scanbus","",@SW_HIDE,7)
IF $PH THEN
    WHILE 1
        $_ &= StdoutRead($PH)
        IF @ERROR THEN EXITLOOP
        ;$_ &= StderrRead($PH)
        ;IF @ERROR THEN EXITLOOP
    WEND
    IF $_ <> "" THEN
        ConsoleWrite($_ & @LF)
        MsgBox(32,"readcd -scanbus",$_)
    ENDIF
ENDIF

I ran this code on the MingW win32 binaries that can be found here http://smithii.com/cdrtools using this direct link cdrtools-2.01-bootcd.ru-w32.zip and it works fine.

If you are using the cygwin edition then more fool you. :unsure:

I will leave the array parts to you.

Ed: Jos is faster by far.

Edited by Mobius

Share this post


Link to post
Share on other sites

Show the code that isn't working.

Hi Jos, Here is one i tried, but it work with this line 'readcd.exe dev=specify a DevID at here sectors=0-0'

#include <array.au3>
_TEST()
Func _TEST()
    Local $eRRout, $a
   $pid = Run('cmd.exe /c '& 'readcd.exe -scanbus', '', @SW_HIDE, 0X02+0X04)
    If Not $pid Then Return SetError(-1, 0, 'Failed to run')
    ProcessWaitClose($pid)
    $eRRout=StderrRead($pid)
        $a = StringSplit($eRRout, @CRLF, 1)
    _ArrayDisplay($a)
EndFunc

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Always link to the official site you downloaded the tool from, hosting it on a file sharing site is asking for disaster / mistrust.

You might have gotten speedier help if you posted some code so others might point you in the right direction, but I am in a random act of kindness sort of mood so....

$_ = ""
$PH = Run("readcd.exe -scanbus","",@SW_HIDE,7)
IF $PH THEN
    WHILE 1
        $_ &= StdoutRead($PH)
        IF @ERROR THEN EXITLOOP
        ;$_ &= StderrRead($PH)
        ;IF @ERROR THEN EXITLOOP
    WEND
    IF $_ <> "" THEN
        ConsoleWrite($_ & @LF)
        MsgBox(32,"readcd -scanbus",$_)
    ENDIF
ENDIF

I ran this code on the MingW win32 binaries that can be found here http://smithii.com/cdrtools using this direct link cdrtools-2.01-bootcd.ru-w32.zip and it works fine.

If you are using the cygwin edition then more fool you. :>

I will leave the array parts to you.

Ed: Jos is faster by far.

thanks lot buddy, it works :unsure: , also thanks the links, i just got a readcd copy from a cdrecord installer, will paly with this.

edit: this edition pretty cool

Edited by lhw

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