Reboot Scheduler

aspears
New Contributor III

I'm using @mm2270 reboot scheduler script and am receiving the attached error when I was the user to pick a deferred time. If I manually add a time then the script works fine. Any ideas?e3e350016f864ced9e629e43778d717a

11 REPLIES 11

rderewianko
Valued Contributor II

What OS version are you running? Cocoa Dialogue has issues with 10.13

aspears
New Contributor III

I'm using a test machine that's running 10.11.6

rderewianko
Valued Contributor II

The error above seems like a value isn't being passed through cocoa dialogue properly..

What's Line 405 on your script?

aspears
New Contributor III

This is line 405: mins="${deferOpt[$userSelection]}"

mm2270
Legendary Contributor II

@aspears I'm just seeing this thread now. I have one initial question for you. Are you using the last cocoaDialog 3 beta version with it, or are you still using version 2.x? If using 2.x, then that's the problem. That script uses the radio button window style which isn't available in pre 3.x beta releases. From the error message I'm seeing being generated, the spelling of CD is "CocoaDialog" which sounds like version 2. In version 3, it was called "cocoaDialog" Note the lowercase "c"
When you pre-define a deferred time value, it drops back to the regular msgbox window, which was present in version 2 as well, so that might explain why it works one way and not the other.

OTOH, If you are using version 3, then let me take a closer look at the script to see if some adjustments are needed. I'll admit that script hasn't been updated in a couple years now. The last effective testing with it was back on 10.10 and 10.11. I kinda stopped working with CD scripts once 10.12 came out, because some of the window styles weren't working well with it at that point. Now that @markcarver has picked up the project again, there's hope of seeing an updated release with support for current OSes again.

jhbush
Valued Contributor II

@aspears if you post your script I can test it for you under the 3.0.999 build.

aspears
New Contributor III

@mm2270 Ah! that makes sense, I am indeed using v2. Do you know where I can download the v3 beta? as there isn't any documentation on how to set up their GitHub version: https://cocoadialog.com/#documentation

aspears
New Contributor III

Hey @jhbush1973 This the script that I'm using https://github.com/mm2270/CasperSuiteScripts/blob/master/reboot_scheduler.sh

mm2270
Legendary Contributor II

Hmm, yeah, that's a problem since the GH page has been updated now, and doesn't have the older 3.x beta release. I'm not sure where you can get it now tbh. In looking here https://cocoadialog.com/v2 it seems the beta 3 was renamed to 2.3 or something to that effect to reflect that they aren't the same as the new 3.x project. But there's no link to get the old 3.x-beta/2.3 release.
I of course have the older release, as do many people, but I'd need to see about how to get it to you in case it's not possible to pull it down directly from the web anymore.
Also, don't bother trying to build the new version 3 from the project right now. It's broken, even if you go through the hoops to get it to build. Mark has said there's still a lot of work and moving parts to it right now.
If you're interested in keeping tabs on the how the new version is shaping up, join the Slack discussion (https://slack.cocoadialog.com). In fact, I would join the Slack discussion and ask where the older v3 beta can be gotten. It might still be around somewhere.

aspears
New Contributor III

Thanks @mm2270 I'll join the slack channel and see if they could provide the 2.3 version. Thank you for your help

aspears
New Contributor III

I found it. They posted it in slack: http://mac.softpedia.com/dyn-postdownload.php/74860c5a2181fe9e8bd7b464c95a892d/5a21a3e3/56c/0/2