1 person found this helpful
Well, NativeProcess is not a display class so that's why you're having
trouble finding a way to access a nativeWindow object.
It does however, allow you to monitor STDIN and STDOUT. So, you can launch a
separate window with the GUI necessary to display the progress of your
process in realtime.
Assuming you added a response handler to your process to handle output,
input and error events, you could trap STDOUT and print it to the screen
via your custom GUI:
Handles responses from the NativeProcess bridge.
private function _onNativeProcessResponse( e:ProgressEvent ):void
// use this w/your custom terminal GUI
var stdOut:String = process.standardOutput.readUTFBytes(
P E A C E
On Fri, Dec 10, 2010 at 4:02 PM, jordana309-362147823521
I would think you could just call a shell script from AIR using the NativeProcess API mentioned by Hasan. That would open the Terminal window for you.
I tried that, but I don't think I did it correctly. In retrospect, I think capturing it in the application might be a little better. But, when using STDIN and
STDOUT listeners, I only am able to pass in one command, and then both of them stop being responsive. Are there examples I could reference for how to dynamically control input and output of a program multiple times, like passing arguments and commands through to a CMD and showing everything it ECHOs in a textbox in my app?
[EDIT] It simply will not allow me to start another file (I have to call a batch file through that CMD instance started by AIR, and it won't allow the call).
[EDIT] Ah. I didn't keep the directory changed here. I just had to CD in my first batch file, and then change how it called all other batch files and then this worked great. I actually have AIR execute a batch file with the following code:
REM Global Variable declairation
SET appRoot=%USERPROFILE%\Desktop\DEV FOLDER\Program Folder
SET startString="%appRoot%\Subfolder\EncodingBaseBatchFile.bat" "%appRoot%" "%appTempPath%"
START CMD /C "%startString%"
This allows me to see the window, and works alright. However, I lose control of the input, and can no longer show that in my terminal. Ideas? Nevermind...I'll post that question as a new thread.
Thanks, you guys!
Message was edited by: jordana309-362147823521