lhw Posted May 1, 2011 Posted May 1, 2011 (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 , help is always appreciated.Edit:alreasy tried via stdout and stderr with failure Edited May 2, 2011 by lhw
Developers Jos Posted May 1, 2011 Developers Posted May 1, 2011 Show the code that isn't working. 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.
Mobius Posted May 1, 2011 Posted May 1, 2011 (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 ENDIFI 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. Edited May 1, 2011 by Mobius
lhw Posted May 1, 2011 Author Posted May 1, 2011 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
lhw Posted May 1, 2011 Author Posted May 1, 2011 (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 , also thanks the links, i just got a readcd copy from a cdrecord installer, will paly with this. edit: this edition pretty cool Edited May 1, 2011 by lhw
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now