Author Topic: WeatherCat Scripts *BETA* of 2012-05-12  (Read 6278 times)

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5001
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, MacBook Pro (Early 2011), macOS 10.13.6, WeatherCat 3
WeatherCat Scripts *BETA* of 2012-05-12
« on: May 12, 2012, 11:10:53 PM »
Dear WeatherCat AppleScript fans,

I've been running the modifications on my AppleScripts to work with Growl 1.3 long enough that I think it is safe to spring them on you'all.  You can download them here:

http://www.canebas.org/WeatherCat/AppleScripts/WeatherCat%20Scripts%202012-05-12.zip

The big change is obviously the Growl 1.3 support.  So I'm especially anxious for reports from folks thus equipped.

I've also put in a lot of testing code to avoid potential problems with Growl crashing and leaving the AppleScript to crash on their next notification.  Now they all will display a dialog and quit (all those that use Growl that is.)

The other change I just added at the last minute is an extra line to Stop WeatherCat Scripts so that it could be used to shutdown WeatherCat as I described in an earlier post.  The line is commented out, but included are instructions on how to enable this for folks with automated startup-shutdown setups.  By using Stop WeatherCat Scripts to shutdown WeatherCat, you can use all the AppleScripts and still automate a WeatherCat restart process.

Upgrade instructions are included in the Upgrade Instructions.rtf file (what a name!  ;D )  They are copied here:

Updating from version of  April 30, 2012 to May 12, 2012
  • Copy the AppleScript application files: Stop WeatherCat Scripts, WC AppleScript Tags Processor, WC ET Reporter, WC Status Growler, WC Storm Monitor, WC Temperature Falling, WC Temperature Rising, WC Twitter Uploader, WC Web Data Uploader, and WC Zambretti Forecaster onto the top of the WeatherCat Scripts folder.  All of the "top-level" AppleScripts applications could be copied over for convenience.
  • Replace the contents of the Documentation folder with the current version.

Enjoy!!  (I hope!)

Cheers, Edouard  [cheers1]

Jace

  • Storm
  • *****
  • Posts: 809
    • DW9675
    • ISuffolk62
    • Yoxford weather site.
  • Station Details: Davis Vantage Pro2, with Mac USB Data Logger. 2.4 GHz Intel Core 2 Duo MacBook, with 8 GB 1033 MHz DDR3 Memory, running Mac OSX Version 10.10.1 (Yosimite).
Re: WeatherCat Scripts *BETA* of 2012-05-12
« Reply #1 on: May 13, 2012, 06:28:02 PM »
err

Can you stand the strain of me 'testing' the scripts Edouard ?  [lol2]  [bounce]

JC

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5001
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, MacBook Pro (Early 2011), macOS 10.13.6, WeatherCat 3
*GULP*!! (Re: WeatherCat Scripts - 2012-05-12)
« Reply #2 on: May 14, 2012, 12:31:38 AM »
Hi JC and WeatherCat scripts, . . .  [cat]

Can you stand the strain of me 'testing' the scripts Edouard ?  [lol2]  [bounce]

What strain?  Why my AppleScripts are about as indestructible as the Titanic, Lusitania, and Costa Concordia are (err, were) unsinkable!!  :o

Perhaps I should take an aspirin before you proceed!!  :-[

Cheers, Edouard  [cheers1]

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: WeatherCat Scripts *BETA* of 2012-05-12
« Reply #3 on: May 15, 2012, 04:35:45 AM »
I've finally got around to installing the latest scripts.

The scripts seem to be working OK individually (accept for the Twitter thing)

I'm seem to be getting the correct Growl notifications with 1.3

The only odd thing is I start all the scripts individually, no problem. But if i start with the "Start script" the Web data Uploader complains that all 3 places i send data to have unknown account numbers etc, all work fine if the Web data uploader is started manually. All files and scripts have been left in the same hierarchy and order as downloaded.

When ever i close the Twitter script I get a "Where is Keychain Scripting.app" So where is it? I remember having this issues once before when originally setting up Twitter uploads, but I can't recall what the answer was.

Tony

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: WeatherCat Scripts *BETA* of 2012-05-12
« Reply #4 on: May 15, 2012, 05:37:53 AM »
Found the problem. AppleScript was using the unmodified scripts in my Download folder instead of the scripts with my user data in the Applications > WC Scripts.
Deleting the copy in Downloads and emptying the trash fixed the issue.

You did warn about this somewhere  :-[

The Keychain is a Lion thing, apparently it has moved since Snow Leopard days, now called KeyChain Access and is in Applications > Utilities

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5001
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, MacBook Pro (Early 2011), macOS 10.13.6, WeatherCat 3
Thanks Tony!! (Re: WeatherCat Scripts - 2012-05-12)
« Reply #5 on: May 15, 2012, 07:06:14 PM »
Howdy Tony and WeatherCat AppleScript fans,

Thanks for the positive reports with regards to Growl - this is supposed'ta work!!

Found the problem. AppleScript was using the unmodified scripts in my Download folder instead of the scripts with my user data in the Applications > WC Scripts.
Deleting the copy in Downloads and emptying the trash fixed the issue.

You did warn about this somewhere  :-[

Unfortunately, everyone has to be very disciplined about keeping only one copy of the scripts around.  The Finder doesn't have this sort of problem so this has be some sort of a weak implementation within AppleScript. 

When ever i close the Twitter script I get a "Where is Keychain Scripting.app" So where is it? I remember having this issues once before when originally setting up Twitter uploads, but I can't recall what the answer was.

The Keychain is a Lion thing, apparently it has moved since Snow Leopard days, now called KeyChain Access and is in Applications > Utilities

So is the twitter script working fine now?  Actually, the keychain scripting.app isn't the same as the KeyChain Access in Lion.  Apple appears to have dropped at least some AppleScript support for accessing the key chain.  If you still have problems, you might try downloading Usable Keychain Scripting from an outfit called Red Sweater.  It is a free download.  I remember something about this from when I first released the script but I don't know if it is needed or not.  Steve would probably remember better than I do since he has been the pioneer "Lion tamer"  [computer]

Cheers, Edouard   [cheers1]

P.S. Thanks everybody for your help in debugging these scripts!!

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1289
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2017 27" iMac 3.8 GHz i5, 40GB RAM, Mac OS 10.14, WeatherCat 3
Re: WeatherCat Scripts *BETA* of 2012-05-12
« Reply #6 on: May 15, 2012, 08:44:30 PM »
Yes, the AppleScripts running under Lion still need to have the user download keychain scripting.app. I just dropped it into the scripting additions folder and pointed to it when the Twitter script called for it.

Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 • WU: KOHAVON11 • AWEKAS • CoCoRaHS • Skywarn •  UK Met Office
MWWN •PWSweather • WeatherBug • WeatherCloud • Twitter • Facebook

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: WeatherCat Scripts *BETA* of 2012-05-12
« Reply #7 on: May 15, 2012, 10:34:07 PM »
I "pointed" the Twitter script to Keychain Access when it queried it whilst  closing the script, works fine... so far!

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5001
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, MacBook Pro (Early 2011), macOS 10.13.6, WeatherCat 3
Hmm, as clear as - mud! (Re: WeatherCat Scripts - 2012-05-12)
« Reply #8 on: May 16, 2012, 12:43:24 AM »
Howdy Steve, Tony, and WeatherCat AppleScript folks,

Yes, the AppleScripts running under Lion still need to have the user download keychain scripting.app. I just dropped it into the scripting additions folder and pointed to it when the Twitter script called for it.

 ;) Ya' see . . . . I'm not losing my mind . . . . at least not completely!  :o  [lol2]

I "pointed" the Twitter script to Keychain Access when it queried it whilst  closing the script, works fine... so far!

Hmm, I see . . . . . definitely the plot now thickens!!

I suppose the explanation is that Apple has only "slimmed down" the available AppleScript tools in the Lion Keychain Access.  However, back in the frenzy to get Steve running, it didn't occur to me to just ask Steve to try the Keychain Access application directly.  The freebie is supposed to be 100% compatible with the Snow Leopard Keychain Access, to it is supposed'ta work.  Fortunately, Tony tried the "even more better" solution and it works too (at least thus far.)  If that continues to be the case, clearly, the easiest it to tell folks what Tony did intuitively.  When the Twitter AppleScript complains, point it at the Lion Keychain Access and get on with it.  However, if there are problems down the road, never hurts to have a plan-B.

Thanks gang for all the help with this!!  [tup]

Cheers, Edouard  [cheers1]

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: Hmm, as clear as - mud! (Re: WeatherCat Scripts - 2012-05-12)
« Reply #9 on: May 16, 2012, 01:56:20 AM »

 the easiest it to tell folks what Tony did intuitively.  When the Twitter AppleScript complains, point it at the Lion Keychain Access and get on with it.  However, if there are problems down the road, never hurts to have a plan-B.

Thanks gang for all the help with this!!  [tup]

Cheers, Edouard  [cheers1]

It wasn't really intuition, I Googled for an answer.

One thing I have noticed with Growl 1.3. If you close it down for what ever reason... and who would... me..  [banghead] and then restart growl with the scripts already running, the scripts don't show Growl notifications anymore. Not sure if this happened with earlier versions of Growl or not. As I have said not many people would normally close down Growl, but I was mucking around with it last night and inadvertently shut it down.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5001
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, MacBook Pro (Early 2011), macOS 10.13.6, WeatherCat 3
Strange that Growls stop (Re: WeatherCat Scripts - 2012-05-12)
« Reply #10 on: May 16, 2012, 10:14:05 PM »
Howdy Tony and WeatherCat fans,

It wasn't really intuition, I Googled for an answer.

Well, I did too, but obviously a few months ago.  I suppose the "more better" answer has percolated up the Google rankings in that time.

One thing I have noticed with Growl 1.3. If you close it down for what ever reason... and who would... me..  [banghead] and then restart growl with the scripts already running, the scripts don't show Growl notifications anymore. Not sure if this happened with earlier versions of Growl or not. As I have said not many people would normally close down Growl, but I was mucking around with it last night and inadvertently shut it down.

Hmm, now that is strange.

I just checked the code again.  Before any Growl notification is generated, every script now checks to see if Growl is running and every script supposed to shutdown if it is isn't.  Also, it uses a way to find which version of Growl is running by (of all things) looking for the application that is associated with this program identifier: com.Growl.GrowlHelperApp.  If it worked the first time, how could it not find Growl a second time?

Let me know if you see it again.  Also, let me know if any other programs have problems using Growl if you leave it shutdown for a period of time.

Do keep me posted!

Cheers, Edouard  [cheers1]

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: WeatherCat Scripts *BETA* of 2012-05-12
« Reply #11 on: May 17, 2012, 02:38:33 PM »
The scripts have been running for 3 days now with literally screens of Growl 1.3 notifications, (most of them to do with Weather Bug  :-\ ) everything working as it should, well done that man  [tup]

My next step is to get the Tags Processor working, could you be so kind as to point me to to the documentation for this.

Cheers,
Tony

Jace

  • Storm
  • *****
  • Posts: 809
    • DW9675
    • ISuffolk62
    • Yoxford weather site.
  • Station Details: Davis Vantage Pro2, with Mac USB Data Logger. 2.4 GHz Intel Core 2 Duo MacBook, with 8 GB 1033 MHz DDR3 Memory, running Mac OSX Version 10.10.1 (Yosimite).
Re: WeatherCat Scripts *BETA* time to burst the bubble ?
« Reply #12 on: May 17, 2012, 04:49:54 PM »
Humm

With Tony's recent successes with the scripts, perhaps I'll 'dip a toe in the water' and re-install Growl 1.3 and try the new scripts.

Time for Edouard to go on holiday !  [cheers1]

JC

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5001
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, MacBook Pro (Early 2011), macOS 10.13.6, WeatherCat 3
Howdy Tony, JC, and WeatherCat fans,  [cat]

The scripts have been running for 3 days now with literally screens of Growl 1.3 notifications, (most of them to do with Weather Bug  :-\ ) everything working as it should, well done that man  [tup]

Hurray!!  [woohoo]

My next step is to get the Tags Processor working, could you be so kind as to point me to to the documentation for this.

Sorry Tony, that's where things get tough.  The docs are cleverly hidden in the folder called: Documentation in the distribution.  However, I'll make it even harder on you . . . . the docs filename is: WC AppleScript Tags Processor docs.rtfd  ;D

With Tony's recent successes with the scripts, perhaps I'll 'dip a toe in the water' and re-install Growl 1.3 and try the new scripts.

Time for Edouard to go on holiday !  [cheers1]

 ;) Uh oh . . . . .

Beam me up Scotty . . . . Quickly!!!
  :o

Cheers, Edouard  [cheers1]

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion

Sorry Tony, that's where things get tough.  The docs are cleverly hidden in the folder called: Documentation in the distribution.  However, I'll make it even harder on you . . . . the docs filename is: WC AppleScript Tags Processor docs.rtfd  ;D



That was too easy... I thought I remember reading them online in, perhaps I didn't. The first of the sub-Antarctic polar blasts has arrived, the old brain is having a bit of trouble warming up these days.