Skip to content

Instantly share code, notes, and snippets.

@melmatsuoka
Created May 18, 2018 18:47
Show Gist options
  • Save melmatsuoka/e662090cd3d1b4bd3237b8d53f7cb571 to your computer and use it in GitHub Desktop.
Save melmatsuoka/e662090cd3d1b4bd3237b8d53f7cb571 to your computer and use it in GitHub Desktop.
Launch macOS app in minimized state.
-- Launches BusyCal in minimized mode.
-- If it's already running, then don't do anything.
tell application "System Events" to (name of processes) contains "BusyCal"
if the result is false then
activate application "BusyCal"
tell application "System Events"
set visible of process "BusyCal" to false
end tell
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment