Jump to content

Recommended Posts

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

wtfpl-badge-1.png

Posted

  On 5/1/2011 at 1:09 PM, 'Jos said:

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
Posted (edited)

  On 5/1/2011 at 1:18 PM, 'Mobius said:

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

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
  • Recently Browsing   0 members

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