获取运行中的进程列表,获取活动过程(和它的应用程序)的Flex / AIR它的、应用程序、进程、过程

2023-09-09 21:48:24 作者:笑著強裝

只是一个匆匆(或许不是:]):

just a quickie (or maybe not:] ):

时有可能得到运行的应用程序/流程和莫名其妙名单,而在后台运行,检查哪些进程处于活动状态?

Is it possible to get somehow list of running applications/processes and, while running in background, check which process is active?

此外 - 如果不知何故,答案是肯定的,是有可能为活动窗口的变化反应/应用程序的反应就好像它是事件,或者绑定到它的自定义事件(如 Event.SystemActiveAppChange )?

Additionally - if somehow, the answer was yes, is it possible to react for change of active window / application react just as if it was Event, or bind to it custom event (e.g. Event.SystemActiveAppChange)?

感谢您的答案,以及指针。

Thank you for answers as well as pointers.

修改:由于可能missunderstanding,我的意思的本地的应用程序 - 你赢/ MAC / Linux机器上的 - 我想(在语言学习的过程)跟踪哪些应用程序我用的最多,做一个小图可能?

EDIT: Due to probable missunderstanding, I mean local applications - on your win/mac/linux machine - I would like to (in process of learning of language) track what apps I use the most, make a little graph maybe?

所以,问题是:在AIR应用程序,在FLEX开发,我想获取/列出所有正在运行的应用程序/流程,以及哪一个是活动的(用户的PC / Mac机/ Linux的)

So, the point is: in AIR app, developed in FLEX, I would like to get/list all running applications/processes, as well as which one is active (on user's PC/Mac/Linux)

推荐答案

不幸的是,这是不可能的,因为空气可以访问既处理信息,也没有系统的性能指标。

Unfortunately this isn't possible, since AIR can access neither process information nor system performance metrics.

您唯一的希望是建立在.NET或目标C其他服务(如,不能跨平台 - 假设这是一个要求),可以通过本地的NetConnection 。我不知道关于Java,但你也许能逃脱单。

Your only hope would be to create another service in .NET or Objective C (as in, not cross platform - assuming that is a requirement) that can provide the process information to your AIR app via a local NetConnection. I'm not sure about Java, but you might be able to get away with Mono.