public function cmd(cmdStr:String):void { if(process && process.running){ process.standardInput.writeUTFBytes(cmdStr + "\n"); } }
NativeProcess 어플리케이션과 standardInput으로 통신할때
전달할 데이터 뒤에 꼭 "\n" 을 붙여줘야 된다.
그렇지 않을경우 제대로 입력이 되지 않는다.
이것때문에 꽤나 긴 시간 삽질을 했다..ㅠ0ㅠ
'AIR' 카테고리의 다른 글
Command Line Execution in Air 2.0 (1) | 2011.03.09 |
---|---|
Using the AIR 2.0 Native Process API to control MPlayer (1) | 2011.03.09 |
NativeApplicationUpdater – updater for AIR apps packaged with native installers (1) | 2011.03.04 |
[AIR] air NativeProcess (1) | 2011.03.03 |