Can an Adobe AIR Application run via the command l

2019-04-25 18:59发布

I have an AIR application that takes command-line arguments via onInvoke. All is good, but I cannot figure out how to print some status messages back to the user (to stdout / console, so to speak). Is it possible?

Even a default log file for traces would be fine, but I can't find any info about it anywhere. Do I need to create my own log file? Now that'd be silly.

4条回答
女痞
2楼-- · 2019-04-25 19:14

I don't think that is possible, but I'm not completely sure though.

There is a flashlog.txt file which you can configure so all trace() statements are logged to it. Check this post http://www.digitalflipbook.com/archives/2005/07/trace_from_the.php for more info on how to set it up. This is for logging from the browser, but I'm pretty sure it should also work from an air app.

Additionally, you could use SOS MAX from Powerflasher to log to an external console through an XML socket.

查看更多
三岁会撩人
3楼-- · 2019-04-25 19:15

Your AIR application is one, big trace window if you want it to be.

查看更多
混吃等死
4楼-- · 2019-04-25 19:20

Take a look at CommandProxy. It is a low level wrapper around your AIR application that lets you send command from AS3 back to the proxy for communicating with the underlying OS. You should be able to add a means of writing to the command line via such a method.

查看更多
Juvenile、少年°
5楼-- · 2019-04-25 19:31

By default, trace() will output to stdout.

查看更多
登录 后发表回答