0

ATFテクスチャでpngファイルを変換するプログラムを作成しようとしていますが、NativeProcessを使用しようとすると問題が発生します...IntelliJIDEAでactionscript3を使用しています。

そのプロンプトコマンドをNativeProcessに渡したいpng2atf -c p -i starling-atf.png -o starling.atf...

だから、私はFile().loadオブジェクトからpngファイルを選択し、次にこのファイルを取得してパラメーターとして自分に送信しNativeProcess、プロンプトコマンド(png2atf -c p -i starling-atf.png -o starling.atf)を介して会話を行います。

何か案は?

4

1 に答える 1

0

@puggsoy uは書き込みです、問題はスペースでした...私は引数でいくつかのスペースを入れました、それが理由です..ここに正しいコードがあります:

f.nativePath = "C:/projects/SDK/Adobe Gaming SDK 1.0.1/Utilities/ATF Tools/Windows/png2atf.exe";

    nativeProcessStartupInfo.executable = f;

    // now create the arguments Vector to pass it to the executable file
    var processArgs:Vector.<String> = new Vector.<String>();
    processArgs[0] = "-c";
    processArgs[1] = arg;
    processArgs[2] = "-i";
    processArgs[3] = input;
    processArgs[4] = "-o";
    processArgs[5] = output;
    nativeProcessStartupInfo.arguments = processArgs;
    process = new NativeProcess();
    process.start(nativeProcessStartupInfo);

于 2013-03-06T07:56:06.457 に答える