Native Process connection capabilities in AIR 2.0

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/NativeProcess.html?allClasses=1


The NativeProcess class provides command line integration and general launching capabilities. The NativeProcess class lets an AIR application execute native processes on the host operating system.


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);

}


You also need to add this to your descriptor file.

<supportedProfiles>extendedDesktop</supportedProfiles>




















Comments