Menu Close

swiftDialog Commander

Interactive control of swiftDialog v1.11.0.2758 (or later) via the macOS Terminal

Background

One of my favorite features of swiftDialog is updating a running dialog with new content.

To better wrap my head around how this works, I wrote swiftDialog Commander both as an exercise to test various commands and to help make sure I understood what was happening in scripts written by other Mac Admins.

Screencast

Features

  • Interactive control of a running dialog via the macOS Terminal
  • Live view of relevant log files
  • Easily test new release features

Usage

  1. Save swiftDialogCommander.sh to your Downloads folder:
curl -o ~/Downloads/swiftDialogCommander.sh https://raw.githubusercontent.com/dan-snelson/dialog-scripts/main/swiftDialog%20Commander/swiftDialogCommander.sh
  1. Review the built-in help via:
    bash ~/Downloads/swiftDialogCommander.sh --help
  2. Execute various commands via:
    bash ~/Downloads/swiftDialogCommander.sh

Example Commands

 
title: My First Test of swiftDialog

icon: /System/Library/CoreServices/Finder.app

message: swiftDialog is pretty sweet

overlayicon: /Library/Application Support/Dialog/Dialog.app

list: Item 1, Item 2, Item 3

listitem: title: Item 1, status: success

progresstext: Item 1 installed.

progress: 33

listitem: title: Item 2, status: wait, statustext: Pending

progress: 66

listitem: title: Item 3, status: wait, statustext: Pending

listitem: title: Item 2, status: fail, statustext: Failed

progresstext: Item 2 failed.

Script

See GitHub for the latest version.

Support

If you need general assistance, please join us on the MacAdmin’s Slack swiftDialog channel.

Posted in Jamf Pro, Scripts, Tips & Tricks

Related Posts