Posted on 07-07-2015 04:58 AM
Dear JAMF friends,
I wrote a script which users can run via the selfservice/policy. This script takes a long time to finish because i need to fetch several GBs from a server. Since there is some waiting time involved i'd like to give my users a popup notification like, 'your data is downloading', 'your data is extracting'.
The jamf binary has those capabilities because it's able to give the cool transparent popups, and it would be awesome to use those in my script.
Can give anyone an enlightening hint?
Many thanks :)
Solved! Go to Solution.
Posted on 07-07-2015 05:54 AM
You could utilize the jamfhelper throughout your script to convey messages. I would recommend searing throughout the discussions for jamfhelper messages or things along those lines.
This particular discussion thread helped me.
https://jamfnation.jamfsoftware.com/discussion.html?id=9848
If you're like me and want to get a pinch more creative, you could add graphics in there to create a make-shift loading bar.
Posted on 07-07-2015 05:54 AM
You could utilize the jamfhelper throughout your script to convey messages. I would recommend searing throughout the discussions for jamfhelper messages or things along those lines.
This particular discussion thread helped me.
https://jamfnation.jamfsoftware.com/discussion.html?id=9848
If you're like me and want to get a pinch more creative, you could add graphics in there to create a make-shift loading bar.
Posted on 07-07-2015 05:59 AM
Have you looked at scripts that use cocoaDialog at all? There are plenty of them posted here on JAMFNation. cocoaDialog has a programmable 'progress bar' mode that can update the text in the dialog as different parts of the script take place and can even show real progress if its scripted correctly.
Although you can use built in tools like jamf binary or jamfHelper, using those to update regular "progress" aren't really their fortes.
Posted on 07-07-2015 06:10 AM
+1 for cocoaDialog. The project is no longer maintained, but it still works.
Posted on 07-07-2015 06:26 AM
I use a branded terminal-notifier
for things like this for a more native feel.
Posted on 07-07-2015 06:47 AM
I just found out about jamfhelper :)
I know about cacaoDialog but it's nicer to use software which is installed already
Posted on 07-07-2015 07:55 AM
There's also Yo which is a Swift app to create native Notification Center messages - same thing though, requires some effort and adds complexity to scripting.