Can anyone give advice on how to display a dialog/notification to users which includes a clickable URL?
displayMessage and jamfHelper are not working out for me, unless I'm not using the right syntax or formatting. AppleScript?
thanks,
Darrin
Can anyone give advice on how to display a dialog/notification to users which includes a clickable URL?
displayMessage and jamfHelper are not working out for me, unless I'm not using the right syntax or formatting. AppleScript?
thanks,
Darrin
Best answer by acidprime
So I created something like this, and just posted and open source version of it
You can find a compiled example below
https://github.com/acidprime/ClickDialog/downloads
It could be integrated into scripts like so
#!/bin/bash
declare -x ClickDialog="/Applications/ClickDialog.app/Contents/MacOS/ClickDialog"
if "$ClickDialog" ; then
echo "User clicked OK"
else
echo "User clicked cancel"
fi
Xcode Project (very basic 10 mins don't judge) below
https://github.com/acidprime/ClickDialog
Technical Details
Basically I just load a web.html file from the bundle ,matched the colors so it looks like a native element and then added a delegate method to catch the url click and redirect it to the default workspace. I added an "activate" and told it that it was a UI element so it will not show the dock icon, much like a display dialog in AppleScript
You can play with the Xcode project ( with no code changes ) if you want to make the window bigger ( in fact you can probably just edit the raw .xib file in interface builder
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.