开发者

Which command line tools can I use to get the currently active application / window on each platform?

I'开发者_运维知识库m trying to create an AIR application to log application usage and the only easy way to get information from the system with AIR is using command line tools and scraping stdout.

I know about tools like top and ps for OS X, but neither of them seems to tell me which application / window is active, maybe I shouldn't even be looking for processes? For my logging purposes I`d like to get the name and title of the currently active window (and application) as a start.

I`m primarily interested in OS X, but would be great to have Windows and Linux equivalents too for the future.

If no such tools exist yet, it would be great to get some pointers how to make them. I haven't done any OS level programming yet, but I'd think creating a command line tool should be one of the easier things to do (completely ignoring GUI frameworks).


These two questions seem to be asking the same thing, unless I've misunderstood your question. Should be a good start for OS X:

Get the title of the current active Window/Document in Mac OS X Finding the Current Active Window in Mac OS X using Python

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜