Skip to main content

macOSActivate

Contents:

macOSActivate(applicationName[, options])

Opens a MacOS application if not already open, and focuses the application.

import { macOSActivate, MacOSApplications } from "@guidepup/guidepup";

(async () => {
// Opens Safari if not already open, and focuses the window.
await macOSActivate(MacOSApplications.Safari);
})();

Parameters:

Returns: Promise<void>