我想按下 Adobe AIR 应用程序中的按钮并执行某些已安装的程序。例如,我有一个名为“Start Winamp”的按钮。当按下这个按钮时,它应该直接启动 Winamp.exe...我不想执行一些命令行,我只想启动一个 exe。或者……是同一个东西吗?请告诉我这是否可能。
谢谢。
借助 AIR 2.0,您现在可以:
if(NativeProcess.isSupported)
{
var file:File = File.desktopDirectory;
file = file.resolvePath("StyleLookupold.exe");
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;
var process:NativeProcess = new NativeProcess();
process.start(nativeProcessStartupInfo);
}
您还需要将其添加到描述符文件中。
<supportedProfiles>extendedDesktop</supportedProfiles>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)