Professional Web Applications Themes

getting list of all active applications - Mac Programming

I can see following question is asked several times before on this and c.s.m.p.misc newsgroup, but still without right answer. So, here it goes again: how to acquire list of all active applications on Mac OSX (like Quartz Debug is able to do)? Thanks....

  1. #1

    Default getting list of all active applications

    I can see following question is asked several times before on this and
    c.s.m.p.misc newsgroup, but still without right answer. So, here it
    goes again: how to acquire list of all active applications on Mac OSX
    (like Quartz Debug is able to do)?

    Thanks.
    Crni Guest

  2. #2

    Default Re: getting list of all active applications

    In article <google.com>,
    yu (Crni Gorac) wrote:
     

    It depends on how you define "active applications". The most likely answer to
    your question, however, is to use GetNextProcess and GetProcessInformation.

    <http://developer.apple.com/doentation/mac/Processes/Processes-41.html>

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: getting list of all active applications

    yu (Crni Gorac) wrote in message news:<google.com>... 

    1) In the terminal app ps -ax (note make the window wide so you see
    the whole command line)
    2) In Panther Applications->Utilities->Activity Monitor and ask it to
    show all.
    2a) In 10.2 I forgot the utility name but it does the same thing as
    Activity Monitor

    --jim
    Jim Guest

  4. #4

    Default Re: getting list of all active applications

    Miro Jurisic <org> wrote in message news:<mit.edu>... 
    >
    > It depends on how you define "active applications". The most likely answer to
    > your question, however, is to use GetNextProcess and GetProcessInformation.
    >
    > <http://developer.apple.com/doentation/mac/Processes/Processes-41.html>[/ref]

    Thank for your reply. Before sending previous posting, I was aware of
    three ways to get info about active active application or applications
    (through an API, of course it's obvious one could use ps (or top) in
    terminal, then Activity Monitor or Quartz Debug applications to
    generate alike info):
    * through kvm_getprocs() syscall (ps on FreeBSD is using it) on all
    active processes on the system
    * through accessibility API (on selected application)
    * through existing but undoented Window Server API that Quartz
    Debug is likely using

    I need to detect all active application that have windows on screen
    and later to access to all of their windows. Process API you
    suggested looks promising, but seems like not beign doented very
    well. Is there a way to find out if some of processes has windows on
    screen while iterating through processes list using this API? Is
    there a way to access to these windows?

    Thanks.
    Crni Guest

  5. #5

    Default Re: getting list of all active applications

    In article <google.com>,
    yu (Crni Gorac) wrote:
     

    The only supported way that I know of to get at the windows of an application is
    using the Accesibility API, but I haven't used it much myself so I can't offer
    further advice. I suspect that you will need to enumerate the processes (either
    using GetNextProcess or using the kernel APIs you mentioned), and for each of
    the processes, start with AXUIElementCreateApplication and go down until you
    find all the windows.

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

Similar Threads

  1. Running Java applications with CF applications
    By isleta13 in forum Coldfusion Server Administration
    Replies: 2
    Last Post: March 28th, 12:48 PM
  2. List running applications on Win32
    By Francis in forum PERL Beginners
    Replies: 1
    Last Post: February 17th, 01:49 PM
  3. DualBootPC Monitor list not active FH10,or 9 win2Kprof
    By envirographics webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 2
    Last Post: December 15th, 06:14 PM
  4. Replies: 0
    Last Post: August 21st, 12:11 AM
  5. Replies: 5
    Last Post: August 1st, 02:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139