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:
applicationName
string Application identifier. See MacOSApplications.- Optional:
options
CommandOptions Additional options.