ProAnswers.org

Jst Press button from Adobe AIR application to execute program?

Can we do this just pressing button from an Adobe AIR application and execute some installed program.
For example, I would have a button named “start Winamp”. When this is pressed it should start Winamp.exe directly.
Is it possible?

Actually There's no direct way of doing it. for that you Try [CommandProxy](http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integration-proof-of-concept/).



You can Read the blog post very carefully. You really need to create two different projects: a native OS executable and an AIR app. The native executable fires up your AIR application. The AIR application in turn requests for the executable to process OS-level requests.



Download the source from [Here](http://code.google.com/p/commandproxy/wiki/Compiling) is a link that describes how to set up the former.



In your AIR app's main MXML file, you need to do the following:




	
		Create a CommandProxy object, add a few event listeners, for connection detection, and Command response and error.




	
		Connect to the native exe via a connect call




	
		In the event handler for connect, create a new Command e.g. ScreenshotCommand and execute it (via CommandProxy.execute method)





..