Application stack

Hi,
is there a way to find out how the Finder/System Events (or other processes i may not know) -stacks visible applications ? (As they show up in the heads-up gui: 1st, 2nd, 3rd last used application, ect.)