Is there any way to call App Expose in Lion programmatically, for example on an event tap, etc?
Asked
Active
Viewed 877 times
2 Answers
5
If you don't mind using a TOTALLY UNDOCUMENTED API, which might change at any point without notice:
void CoreDockSendNotification(CFStringRef, void *);
(...)
CoreDockSendNotification(@"com.apple.expose.front.awake", NULL);
Other known arguments are @"com.apple.expose.awake"
and @"com.apple.dashboard.awake"
, which activate Mission Control and Dashboard, respectively. @"com.apple.showdesktop.awake"
used to activate Show Desktop, but no longer works on current versions of macOS.
Note that most applications should not use these calls -- these actions are intended to be invoked directly by the user.
3
Expose does not exist in Lion, it has been merged with Spaces into the Mission Control application. You can launch Mission Control:
[[NSWorkspace sharedWorkspace] launchApplication:@"Mission Control"];

Davyd Geyl
- 4,578
- 1
- 28
- 35
-
2Actually within Mission Control lies App Expose (four finger swipe down), that's what I'm trying to access. Know of any way of accessing that? – aroooo Sep 22 '11 at 07:58