-1

In my custom app on Mac OS X, when a button is clicked I need to display all the running applications(programs) in mac in a dialog box. For eg: If a notes, itunes, safari, iphoto etc applications are running in Mac I need to show them arranged in a grid in a dialog box. In mac, if we press command + option + esc keys will show the running applications.

Please suggest how to get the running apps from OS X in code.

My app is similar to Cisco Webex. For content sharing we first need to list running applications and allow user select what to share.

Thanks in advance. Haney.

nobody
  • 19,814
  • 17
  • 56
  • 77

1 Answers1

0

To show the running applications I used the following:

for (NSRunningApplication *currApp in [[NSWorkspace sharedWorkspace] runningApplications]) {
    if ([currApp isActive]) {
        NSLog(@"* active application is= %@", [currApp localizedName]);
    } else {
        NSLog(@"  %@", [currApp localizedName]);
    }
}
NSLog(@"---");

I am able to print the name of the application. But I need to display the icons in a dialog box in a grid or as a list.

Please share your suggestions.