我开发了一个AIR应用程序。我想当我按下打开按钮时,它用notepad ++打开文本文件,我指定为(“C:\ Program Files \ Notepad ++ \ notepad ++。exe”)或我提供的任何其他应用程序。我还可以为应用程序指定命令行参数。感谢
答案 0 :(得分:2)
if(NativeProcess.isSupported)
{
var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
var file:File = new File("Appication to launch");
npsi.executable = file;
var args:Vector.<String> = new Vector.<String>();
args[0] = "File that is being open with application";
args[1] = "Additonal argument if any";
npsi.arguments = args;
var process:NativeProcess = new NativeProcess();
process.start(npsi);
}
这就是我做的。可能对别人有所帮助。感谢