Adobe AIR to execute program

后端 未结 10 2150
陌清茗
陌清茗 2020-12-01 00:28

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 pres

10条回答
  •  渐次进展
    2020-12-01 00:47

    Another way of doing this is launching simple webserver on local machine (in background), and call it's methods using HTTPService.

    The background webserver could be for example in python: http://fragments.turtlemeat.com/pythonwebserver.php

    And it can launch executables and provide functionality that AIR cannot.

    This keeps Flex code clean because it only implements REST interface and python (or other language) the rest of work. You can also benefit from using python as a interface to sqlite database or you can launch whole django as a webserver.

    The only drawback is that the server must be already running on localhost .. and listening to some port (ie. 81). you can probably do this by launching the server on start of system.

    It's not the best way but in some cases it could help your project as it did for me.

提交回复
热议问题