Trixology

WeatherCat => WeatherCat Integration => Topic started by: elagache on May 12, 2012, 11:10:53 PM

Title: WeatherCat Scripts *BETA* of 2012-05-12
Post by: elagache 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 (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

Enjoy!!  (I hope!)

Cheers, Edouard  [cheers1]
Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: jace on May 13, 2012, 06:28:02 PM
err

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

JC
Title: *GULP*!! (Re: WeatherCat Scripts - 2012-05-12)
Post by: elagache 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]
Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: HairyMcLeary 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
Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: HairyMcLeary 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
Title: Thanks Tony!! (Re: WeatherCat Scripts - 2012-05-12)
Post by: elagache 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 (http://www.red-sweater.com/blog/2035/usable-keychain-scripting-for-lion) from an outfit called Red Sweater (http://www.red-sweater.com/).  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!! (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/thankyou.gif)
Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: Steve 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
Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: HairyMcLeary 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!
Title: Hmm, as clear as - mud! (Re: WeatherCat Scripts - 2012-05-12)
Post by: elagache 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 (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/whacko_smiley.gif) . . . . 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!! (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/scratch_head.gif)

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]
Title: Re: Hmm, as clear as - mud! (Re: WeatherCat Scripts - 2012-05-12)
Post by: HairyMcLeary 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.
Title: Strange that Growls stop (Re: WeatherCat Scripts - 2012-05-12)
Post by: elagache 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]
Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: HairyMcLeary 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
Title: Re: WeatherCat Scripts *BETA* time to burst the bubble ?
Post by: jace 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
Title: Docs "hidden" in Documentation folder! (Re: WeatherCat Scripts - 2012-05-12)
Post by: elagache on May 17, 2012, 05:32:12 PM
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]
Title: Re: Docs "hidden" in Documentation folder! (Re: WeatherCat Scripts - 2012-05-12)
Post by: HairyMcLeary on May 17, 2012, 10:28:59 PM

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.
Title: Re: WeatherCat Scripts *BETA* time to burst the bubble ?
Post by: HairyMcLeary on May 17, 2012, 10:33:31 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

I like the way Growl 1.3 uses the "Roll Up' to record notifications instead of having the screen full of them, I don't think that was a option in earlier versions, if it was i missed it  ???

At the moment I've got both the Roll-up and the normal notifications , I will need to go through the scripts and set them so that the notifications don't "stick". I think this should be possible.
Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: jace on May 18, 2012, 06:20:50 PM
Hi Tony

I found with both versions of Growl, in the preferences you can configure each applications default notification. The 'default' setting for all applications seems to be 'application decides' some of these notifications disappear after a set time, others seem to stick on screen for ever. For normal script running notifications you can set the notification to 'never'.

The Roll Up  in version: 1.3 is very handy indeed, it's not in the earlier version.  :-\

Might still re-install Growl 1.3, but trying to write a web page, one thing at a time..................

JC



Title: Re: WeatherCat Scripts *BETA* time to burst the bubble ?
Post by: elagache on May 18, 2012, 09:25:52 PM
Hi Tony, JC, and WeatherCat AppleScript fans,

I like the way Growl 1.3 uses the "Roll Up' to record notifications instead of having the screen full of them, I don't think that was a option in earlier versions, if it was i missed it  ???

You are correct, this is new in Growl 1.3.  I would very much like to try it out!!

At the moment I've got both the Roll-up and the normal notifications , I will need to go through the scripts and set them so that the notifications don't "stick". I think this should be possible.

Most of the AppleScripts have a useSticky option to turn off all sticky notifications.  That's probably the fast way to turn it off in most cases.  For the exceptions, JC is right, you can configure this in the Growl preferences.

Cheers, Edouard  [cheers1]
Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: HairyMcLeary on May 18, 2012, 10:41:19 PM
I've finally got around to enabling all of your scripts, with the Zambretti and Station Status now uploading to my web site.

I'm happy to report no issues whatsoever on Lion with Growl 1.3

Great work Edouard  [tup]
Title: Hurray!! (Re: WeatherCat Scripts - 2012-05-12)
Post by: elagache on May 19, 2012, 02:55:22 AM
Howdy Tony and Thanks!!  [tup]

I've finally got around to enabling all of your scripts, with the Zambretti and Station Status now uploading to my web site.

I'm happy to report no issues whatsoever on Lion with Growl 1.3

Glad to hear it!  [bounce]

It's been a terrific struggle but . . . . once in a while you win one!  [biggrin]

Cheers, Edouard  [cheers1]
Title: I broke one !!! Re : WeatherCat Scripts *BETA* of 2012-05-12
Post by: jace on June 01, 2012, 12:11:59 PM
Time to go hide Edouard  [computer] [cheers1]

Only playing with the Twitter uploader script so far so have not yet tried the rest  [lol2] I've set the new script up with my account details etc, saved it properly  [lol] and when I go to start it  I get the following message: <<script>> doesn't understand the isGrowlAvailable message......... [interesting]

Prior to all this I deleted the old twitter script and emptied the rubbish (trash) bin, made sure no old copies of the script where hiding anywhere etc.....


JC

Title: Re: WeatherCat Scripts *BETA* of 2012-05-12
Post by: Randall75 on June 01, 2012, 02:49:24 PM
Hi Edouard
 Talking about scripts the WC Web Data Uploader quit 30 minutes after I left on vacation don't know why
 [cheers1]
Title: Bummer dude! (Re: WeatherCat Scripts - 2012-05-12)
Post by: elagache on June 01, 2012, 04:37:44 PM
Hi Randall and WeatherCat AppleScript fans,

Talking about scripts the WC Web Data Uploader quit 30 minutes after I left on vacation don't know why

Bummer dude!!  :(

If you were curious, you might try to find using Console to see if there were any log entries from the script at the time it crashed.  But I suspect it wouldn't be easy to find the right log file.

I am a bit puzzled.  I can't recall the last time a script just went belly up.  Sometimes they throw up a dialog box, but even that has useful information in it.  Perhaps the problem has something to do with your station generation a few more data errors.  The scripts might be vulnerable to that in a way I've never experienced.

Certainly if you see any new symptoms - send'em my way!!

Cheers, Edouard  [cheers1]
Title: WeatherCat shutdown delay advice (Re: WeatherCat Scripts - 2012-05-12)
Post by: elagache on June 03, 2012, 01:27:19 AM
Dear WeatherCat AppleScript fans,

I thought I would provide a quickie guide to using Stu's new shutdown delay feature and the Stop WeatherCat Scripts AppleScript.  I haven't had a chance to do much testing, but just in a few tries, I find that you can set a delay of 4 seconds on my machine and the AppleScripts will all quit with about a second to spare.  The best thing to do is to run the Stop WeatherCat Scripts manually and time it on your machine.  Then to be safe, give yourself another second or two just in case something is slow to shutdown.

Once set up, it works very nicely and makes starting and stopping WeatherCat with all of its entourage of AppleScripts very simple and as swift as circumstances permit!  :)

Cheers, Edouard  [cheers1]