flash air NativeProcess 相关问题
先附上源码
import flash.desktop.NativeApplication;
import flash.desktop.NativeProcess;
import flash.desktop.NativeProcessStartupInfo;
import flash.filesystem.File;
import flash.events.MouseEvent;
var process:NativeProcess = new NativeProcess;
NativeApplication.nativeApplication.autoExit = true;
var file:File = new File;
file = file.resolvePath("C:/Windows/System32/cmd.exe");
var processArg:Vector. = new Vector.();
processArg.push("/c");
processArg.push("start C:/Windows/System32/osk.exe");
var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
npsi.executable = file;
npsi.arguments = processArg;
stop();
stage.addEventListener(MouseEvent.CLICK, click_handler );
function click_handler( e : MouseEvent ) : void
{
if( process.running )
{
return;
}
process.start(npsi);
}
这段源码在flash编译器里调试运行的时候没有任何问题,点击舞台可以弹出系统软键盘,但是很奇怪的是我发不成exe安装包后,点击安装,然后运行程序,点击应用就调不出软键盘了; Air 3.2,配置文件中 desktop extendedDesktop已添加