A very flexible and scriptable Dialog app (not Dialog Toolkit)

I have been looking for something like this for a while and have finally come across an open source app which scripters might find useful. From the github site…

swiftDialog is an open source admin utility for macOS 12 or later written in SwiftUI that presents custom dialogs, displays informative messages or can be used as a form to request user input.

Initially designed to work with shell scripts (which is also extremely useful) it is highly configurable and is pretty straightforward to use from within AppleScripts. e.g. something like this…

try
	set theResult to (do shell script "/usr/local/bin/dialog -s --title \"Welcome to swiftDialog\" --message \"Hi There.  <br>It's really nice to see you 🙂\" --button1text \"Hello\" --button1action \"https://github.com/swiftDialog/swiftDialog/\" --button2 --button2text \"Cancel\" --infobuttontext \"Click here for more details\" --infobuttonaction \"https://github.com/swiftDialog/swiftDialog/wiki/Buttons-and-button-behaviour\" --quitoninfo")
on error number errnum
	display dialog errnum
end try

Check out the swiftDialog Wiki to get an idea of just how configurable it is. It seems to be being actively developed by Bart Reardon. After having played around with it for a while it appears to tick an awful lot of boxes.

n.b. To install it is recommended to use the dialog-2.5.1-4775.pkg (requires admin privileges as it is stored in /usr/local/bin/)

Hope somebody finds this useful.

1 Like

I have added a link to SwiftDialog to the Automation Tools section of our Useful Links page.