[Gambas-user] Re:Creating an interface for Lame
sakya
sakya_tg at ...325...
Tue Oct 11 13:20:30 CEST 2005
Hi!
To get the output of a command:
Declare a process variable (form level):
Private Proc as Process
launch the external command with the EXEC command like:
EXEC ["lame", "audio.wav", "audio.mp3"] for READ as proc
In this way you launch lame and the Gambas program continues to next
line (doesn't wait for Lame to end)
Declare a sub Process_Read and read the lame's output:
PUBLIC SUB Process_Read()
DIM line as String
LINE INPUT #LAST, line
END
Analyze the lame's output and do what you need to. :-)
If you want to read also errors from lame:
PUBLIC SUB Process_Error(sData AS String)
END
The sData variable contains the error text.
Ciaooo
Sakya
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
More information about the User
mailing list