Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get list of all applications currently running and visible in Dock for Mac OS X programming?
    primarykey
    data
    text
    <p>I need to know which applications are running and have an active window. Something similar must be what's in the 'command + tab' hotkey switcher.</p> <p>When I run some code like this:</p> <pre><code>NSWorkspace * ws = [NSWorkspace sharedWorkspace]; NSArray * apps = [ws runningApplications]; NSLog (@"%@", apps); </code></pre> <p>I get this in my log:</p> <pre><code>"&lt;NSRunningApplication: 0x6080001052b0 (com.apple.loginwindow - 66)&gt;", "&lt;NSRunningApplication: 0x608000105340 (com.apple.systemuiserver - 285)&gt;", "&lt;NSRunningApplication: 0x6080001053d0 (com.apple.dock - 284)&gt;", "&lt;NSRunningApplication: 0x608000105460 (com.apple.finder - 286)&gt;", "&lt;NSRunningApplication: 0x6080001054f0 (com.apple.iTunesHelper - 339)&gt;", "&lt;NSRunningApplication: 0x608000105580 (cc.omh.Clyppan - 340)&gt;", "&lt;NSRunningApplication: 0x608000105610 (ws.agile.1PasswordAgent - 333)&gt;", "&lt;NSRunningApplication: 0x6080001056a0 (com.irradiatedsoftware.Cinch-Direct - 342)&gt;", "&lt;NSRunningApplication: 0x608000105730 (com.leapmotion.Leap-Motion - 343)&gt;", "&lt;NSRunningApplication: 0x6080001057c0 (com.apple.notificationcenterui - 316)&gt;", "&lt;NSRunningApplication: 0x608000105850 (com.smileonmymac.textexpander - 348)&gt;", "&lt;NSRunningApplication: 0x6080001058e0 (com.lightheadsw.caffeine - 350)&gt;", "&lt;NSRunningApplication: 0x608000105970 (2BUA8C4S2C.com.agilebits.onepassword4-helper - 309)&gt;" </code></pre> <p>It's showing all running applications. I only want the applications that are running and visible in the Dock.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload