Author Topic: Sometimes my AppleScripts even surprise me!!  (Read 1457 times)


  • Global Moderator
  • Storm
  • *****
  • Posts: 5169
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Sometimes my AppleScripts even surprise me!!
« on: July 10, 2012, 12:55:46 AM »
Dear WeatherCat fans,

While in the midst of catching up with all the busy goings on on this forum . . . .  we lost power at the house.

Not knowing how long it would be before power was restored - I ran around and just down all the computer before the UPS units got drained too far.  I managed to shutdown the last computer when . . . . the power came back on (see rant above!  >:( )

So, reverse the process and eventually WeatherCat starts running along with da' Cat's entourage of AppleScripts.  I was scrambling around so I didn't watch the start up process.  Now quickly I've become addicted to WeatherCat starting the AppleScripts for me (thanks Stu![tup])

When I returned to my computer there was this growl notification on my screen:

It took me a second to realize what had happened.  When the power failed it took down the Internet.  However, it took me a while to actually shut my MacBook down.  In that interval while running on UPS, WC Status Growler detected the failure and started counting.  When I shut down my computer, the AppleScript safely saved it state in a file.  When I restarted my computer, WC Status Growler restored its state from the file and continued to count until the Internet was restored.  By then the Internet was working, so the script dutifully announced the end of the outage.

I hadn't though through the implications of having the scripts save everything, but it means even extreme weather or something like an Internet outrage will be tracked even if you have to completely turn your computer off.

So, now you know!!

Cheers, Edouard  [cheers1]