Actionscript 3 使用NativeProcess、actionscript3转换文件时出现问题

Actionscript 3 使用NativeProcess、actionscript3转换文件时出现问题,actionscript-3,Actionscript 3,我正在尝试制作一个程序来转换ATF纹理中的png文件,但是当我尝试使用NativeProcess时遇到了一些问题。。。我正在将ActionScript3与IntelliJ IDEA一起使用 我想将提示命令png2atf-cp-I starling-atf.png-o starling.atf,传递给我的NativeProcess 因此,我从一个file().load对象中选择一个png文件,然后我想把这个文件作为参数发送给我的NativeProcess,并通过提示符命令(png2atf-c p-

我正在尝试制作一个程序来转换ATF纹理中的png文件,但是当我尝试使用NativeProcess时遇到了一些问题。。。我正在将ActionScript3与IntelliJ IDEA一起使用

我想将提示命令
png2atf-cp-I starling-atf.png-o starling.atf
,传递给我的NativeProcess

因此,我从一个
file().load
对象中选择一个png文件,然后我想把这个文件作为参数发送给我的
NativeProcess
,并通过提示符命令(
png2atf-c p-i starling-atf.png-o starling.atf
)进行对话


有什么想法吗?

@puggu正在写,问题是空格。。。我用args放了一些空格,这就是为什么。。 下面是正确的代码:


f、 nativePath=“C:/projects/SDK/Adobe Gaming SDK 1.0.1/Utilities/ATF Tools/Windows/png2atf.exe”

nativeProcessStartupInfo.executable=f;
//现在创建参数向量,将其传递给可执行文件
变量processArgs:Vector.=新向量();
processArgs[0]=“-c”;
processArgs[1]=arg;
processArgs[2]=“-i”;
processArgs[3]=输入;
processArgs[4]=“-o”;
processArgs[5]=输出;
nativeProcessStartupInfo.arguments=processArgs;
进程=新的NativeProcess();
进程启动(nativeProcessStartupInfo);

你说你有麻烦了。。。有什么问题吗?它是否按预期工作,或者您根本不确定如何将文件路径作为参数传递?您尝试了什么?我猜您需要向
png2atf
命令传递一个文件路径,就像您在命令提示符中所做的那样。@Antonie Lassauzay这就是问题所在,我无法将line命令作为参数传递…@puggsoy我有这个<代码>f=新文件();f、 nativePath=“C:/projects/SDK/Adobe Gaming SDK 1.0.1/Utilities/ATF Tools/Windows/png2atf.exe”;`变量processArgs:Vector.=新向量();processArgs[0]=“i”;processArgs[1]=“C:/projects/images/Penguins.png”;processArgs[2]=“-o”;processArgs[3]=“C:/projects/images/Penguins.atf”nativeProcessStartupInfo.arguments=processArgs此处的代码标记不起作用,请单击“添加注释”下面的“帮助”查看如何编写它。无论如何,这看起来像是有效的代码,所以我看不出问题所在。请使用您试图执行但不起作用的代码编辑您的问题(而不是注释)。
    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);