Display modal dialogue boxes on macOS endpoints with customizable text, buttons, and alert types
This Automox Worklet™ generates native macOS dialogue boxes using the osascript command to invoke AppleScript. The Worklet displays alert-style notifications that appear in the center of the user's screen and persist until dismissed or acknowledged.
Unlike notifications that appear in the notification center and can be easily dismissed or missed, dialogue boxes created by this Worklet demand user interaction. You can customize the title, message text, button labels, alert type (informational, warning, or critical), timeout behavior, and even configure buttons to open URLs when clicked.
The Worklet uses the display alert AppleScript command with configurable variables that you set during remediation, making it flexible for different notification scenarios without requiring script modifications.
Critical communications often get buried in notification centers or missed entirely. Modal dialogue boxes maintain important messages reach users by interrupting their workflow and requiring explicit acknowledgment. This is essential for security notifications, compliance reminders, and time-sensitive administrative announcements.
You can use this Worklet to notify users before executing other automated tasks, confirm actions before proceeding, or distribute critical security alerts across your macOS fleet. The persistent nature of dialogue boxes means users cannot accidentally dismiss important information.
Evaluation phase: The evaluation script simply exits with code 1, indicating the remediation should run.
Remediation phase: The remediation script sets titleText and messageText variables, then uses osascript to execute AppleScript display alert commands. The dialogue appears on the user's screen immediately and remains until they click a button or the timeout expires.
macOS 10.12 or later (Sierra and newer)
AppleScript and osascript available (standard on all macOS systems)
Bash shell interpreter available
Administrative privileges required for Worklet execution
Custom titleText and messageText variables configured in the remediation script
Optional: buttons, alert type, timeout, and URL redirect parameters for advanced configurations
After execution, users will see a modal alert dialogue box at the center of their screen with your custom title and message. The dialogue will not disappear or move to the notification center. Users must click the configured button or wait for the optional timeout to dismiss it.
If you configure custom buttons, users can click different options to trigger different actions, such as opening a specific URL in Safari or their default browser. The Worklet completes successfully whether the user clicks a button or the dialogue times out.
Run this Worklet on a pilot macOS endpoint and review evaluation output for macos notifier.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as exit.
Validate remediation effects from script operations such as osascript, exit, then rerun evaluation for compliance.
For technical validation, compare endpoint state to the Worklet evaluation logic and remediation flow for macos notifier. This supports repeatable system preferences workflows, faster change control review, and auditable compliance evidence.
Useful script references for this Worklet include evaluation operations such as exit and remediation operations such as osascript, exit. Use these indicators to verify that endpoint changes match intended policy outcomes.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy