Name of the current app ?

  • Hi all, and have an happy new year !

    My first question this year, how can I get the name of the active
    application, and, if possible, get the transitions (active app changed
    notifications) ?

    Thanks,

    Raphael
  • On Wednesday, January 2, 2002, at 10:45  am, Raphael Sebbe wrote:

    > My first question this year, how can I get the name of the active
    > application, and, if possible, get the transitions (active app changed
    > notifications) ?

    The API to do so is private. You can, however, look at the source to ASM
    (see www.vercruesse.de) to see how it is done.

      -- Finlay
  • Thanks, I see now. Still, it feels like a bit risky to use that...

    Raphael

    On Wednesday, January 2, 2002, at 08:18  PM, Finlay Dobbie wrote:

    >
    > On Wednesday, January 2, 2002, at 10:45  am, Raphael Sebbe wrote:
    >
    >> My first question this year, how can I get the name of the active
    >> application, and, if possible, get the transitions (active app changed
    >> notifications) ?
    >
    > The API to do so is private. You can, however, look at the source to
    > ASM (see www.vercruesse.de) to see how it is done.
    >
    > -- Finlay
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
  • On Thursday, January 3, 2002, at 10:55  AM, Raphael Sebbe wrote:

    > Thanks, I see now. Still, it feels like a bit risky to use that...

    >> On Wednesday, January 2, 2002, at 10:45  am, Raphael Sebbe wrote:
    >>
    >>> My first question this year, how can I get the name of the active
    >>> application, and, if possible, get the transitions (active app
    >>> changed notifications) ?

    You can get the name of the front process using the Carbon process
    manager.  You can get app transitioned events using Carbon Events.
    Depending on your needs, this may work quite nicely (or rather
    inconveniently if you are building an AppKit application).

    Jim