Share to EffectHub.com

You can earn money or coins from your share:)

Tips: you can use Sparticle for uploading away3D effects.

Tips: you can download Sparticle for uploading effects.

Tips: The ActionScript editor is supporting Away3D, Starling, Dragonbones and Flex frameworks.

Tips: paste the web page URL then click button:)

Adobe AIR to execute program



I would like to press a 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...I don't want some command line thing executed, I only want an exe to start. Or...is it the same thing ? Please, let me know if this is possible.

Tags

901 views    3 answers


0


here is a simple code to execute .exe file from adobe air. openPhotoshopBtn.addEventListener(MouseEvent.CLICK,openPhotoshop); private function openPhotoshop(){ //--------first define the path of .exe file var photoshop:File = new File("C:/Program Files/Adobe/Adobe Photoshop CS5.1 (64 Bit)/Photoshop.exe") var startupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); startupInfo.executable = photoshop; var process:NativeProcess = new NativeProcess(); process.start(startupInfo); }

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: helpers/time_helper.php

Line Number: 22

2015-06-09     0 Comments


0


here is a simple code to execute .exe file from adobe air. openPhotoshopBtn.addEventListener(MouseEvent.CLICK,openPhotoshop); private function openPhotoshop(){ //--------first define the path of .exe file var photoshop:File = new File("C:/Program Files/Adobe/Adobe Photoshop CS5.1 (64 Bit)/Photoshop.exe") var startupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); startupInfo.executable = photoshop; var process:NativeProcess = new NativeProcess(); process.start(startupInfo); }

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: helpers/time_helper.php

Line Number: 22

2015-06-09     0 Comments


0


There's no direct way of doing it. Try CommandProxy.

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 Google Code and create two projects -- a Visual Studio/Mono for the sample C# exe and another -- for the AIR application. Here 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)


A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: helpers/time_helper.php

Line Number: 22

2014-07-18     0 Comments

cloudwinds

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: helpers/time_helper.php

Line Number: 22

2014-07-18

Public Question, everyone could view answers and download attachments.

Finish this task then you can earn 10

>>Back to Task List


Want to work on this task?

Post My Answer


Sponsor


You may interest with



Share

Join Effecthub.com


Or Login with Your Email Address:

Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: views/footer.php

Line Number: 6

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/task.php

Line Number: 19

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/task.php

Line Number: 84