Opening Launchpad via KM Application Switcher

Has anyone succeeded in adding macOS Launchpad as an 'always include' app in KM's Application Switcher?

I can get it to show up in the switcher, but when it's opened it immediately closes.

As a possible workaround, I tried creating a simple Apple Script to activate Launchpad.app and saved it as an Application to add to the Application Switcher. But this causes Launchpad.app to become unresponsive and has to be force quit.

I'm trying to help. Launchpad is a strange application. If I do this:

...it will successfully launch, but the KM Engine will never THINK that it has successfully launched, resulting in a timeout error. This could be related to your problems.

I have a feeling that Launchpad is implemented using Spaces, and Apple has never released an API for Spaces, which means KM may not be able to treat it correctly.

1 Like

I think it's actually part of the Dock's processes, as some "settings" type data is stored in the Dock's plist. For example, as found on Stack Overflow:

defaults -currentHost read com.apple.dock LaunchPadDBName

That returns the UUID used in setting up the LaunchPad database. Also from that thread, if you want to find the actual database, do this:

echo /private$(getconf DARWIN_USER_DIR)com.apple.dock.launchpad/db/db

You could then, if you like living on the edge, edit the database with a sqlite3 editing app :).

Anyway, I digress … I think it's part of the Dock, and that's why it's not behaving like a real app.

-rob.

I seem to have figured it out. Instead of using an AppleScript Application, I created an Automator Application and gave it the same icon as Launchpad.

So now I can launch my applications using Launchpad by launching my Launcher app which launches Launchpad via the Launch Application automator action. Who says there's no such thing as a free launch. I'll get my coat.

1 Like

Wrap your app's commands in an ignoring application responses block:

ignoring application responses
	tell application "Launchpad"
		activate
	end tell
end ignoring

Basically, Launchpad never responds with the "OK, I've done that command!" that your script is expecting, so it'll sit there waiting until there's a timeout. ignoring application responses does just what it says, the script doesn't wait and will complete and exit cleanly.

1 Like

Your solutions are frequently amazing.

1 Like

I agree and so are yours @Airy

1 Like