ApplesauceOS
Read Markdown ↗Download .md

openApp

Bring an installed app to the foreground.

js
openApp(bundleId, async = false)

Arguments

ArgumentTypeMeaning
bundleIdstringInstalled app identifier.
asyncbooleanOptional; false waits for activation, true requests launch and returns immediately.

Returns

Boolean activation/request result. Still wait for the screen you need.

Example

js
if (!openApp("com.apple.Preferences")) {
  throw new Error("Could not open Settings");
}

Also available as

appRun, appActivate.

All JavaScript APIs · Automation playbook