Call Expose In Lion

Is there a way to invoke an Expose application in Lion programmatically, for example by clicking on an event, etc.

+4
source share
2 answers

If you are not opposed to using the TOTALLY UNDOCUMENTED API, which is subject to change at any time without notice:

void CoreDockSendNotification(CFStringRef, void *); (...) CoreDockSendNotification(@"com.apple.expose.front.awake", NULL); 

Other well-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 it no longer works with current versions of macOS.

Please note that most applications should not use these calls - these actions are intended to be directly called by the user.

+5
source

Expose does not exist in Lion, it has been merged with Spaces in the Mission Control application. You can run Mission Control:

 [[NSWorkspace sharedWorkspace] launchApplication:@"Mission Control"]; 
+3
source

All Articles