Author Topic: WeatherCat Scripts *BETA* of 2012-04-30  (Read 17507 times)

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Dear WeatherCat AppleScript fans,

Yeah I should have tried this before but . . .  insert here the usual lament about lack of time . . . .

Today was my first attempt to use WeatherCat to launch and shutdown all my AppleScripts using the launcher scripts I wrote.  Launching works just fine.  Alas, shutting down runs into a problem.  I have pauses so that all the dependent AppleScripts shut down before the two AppleScripts that are used by others quit.  I do this to avoid this problem of one AppleScripts accidentially launching another which is in the process of being shutdown.

Unfortunately, If you launch Stop WeatherCat Scripts as the shutdown action from WeatherCat, one thing you cannot "delay" is WeatherCat itself shutting down.  Sure enough, WeatherCat has completely quit before my AppleScripts have.  During the delay at least one of the AppleScripts sends an AppleScript request that - causes WeatherCat to automatically start up again . . . .  >:( 

So the seemingly obvious idea of making Stop WeatherCat Scripts the shutdown action won't do at all what you want.  Instead it will cause WeatherCat to restart - not finally quit.

You have two options.  You can either run Stop WeatherCat Scripts manually just before stopping WeatherCat, or you could have the AppleScript shut WeatherCat instead having WeatherCat control the operation.  To do that you could add the following line at the bottom of Stop WeatherCat Scripts:

Code: [Select]
tell application "WeatherCat" to quit
Then when you launch Stop WeatherCat Scripts, the last action it would do is shutdown WeatherCat itself.

Since I normally shutdown WeatherCat "by hand" saving one action to quit isn't worth the trouble for me.  However, if you want to automate your start up and shutdown processes, adding that line above should make it possible to shutdown using something like Automator.

By the way, the AppleScript command:

Code: [Select]
tell application "WeatherCat" to activate
Causes WeatherCat to launch without that problem of the startup window remaining open.  This line could be used in some sort of an automated start sequence if using Automator directly is a nuisance.

Cheers, Edouard  [cheers1] 

kelsowx

  • Gentle Breeze
  • **
  • Posts: 12
    • DW4395
    • IQLDKELS2
  • Station Details: La Crosse WS2306 connected to an iMac OSX 10.8 and now WeatherCat instead of LWC
Re: WeatherCat Scripts *BETA* of 2012-04-30
« Reply #31 on: March 30, 2013, 11:53:43 PM »
Well, as one who never has enough time, I sympathise.

I finally got around to installing Weather Cat, having run LWC for ages. My problem is that I simply forget how all this stuff works and how they all relate to each other, and have to spend days scrolling through forum posts to get the latest info to reanalyse over again.

Anyway I have now downloaded all the new forms of Script, and put the Script folder in my Applications home folder. I then modified and ran the Twit String Test.scpt, only to find that changing the units does not change the output, similarly, changing the timezone does not change the output. I still get US units and PDT as the time zone despite my edits. Restarting the script editor does not help



elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Do you have a WC Twitter Uploader prefs.scpt file? (Re: WeatherCat Scripts)
« Reply #32 on: March 31, 2013, 09:15:39 PM »
Dear kelsowx,

Sorry, I'm afraid I don't understand very clearly your problem.  However, there have been a lot of changes to these AppleScripts in the transition to working with WeatherCat.  The fact that you are getting the same defaults as I set up the program with suggests to me that you haven't got the preference file correctly installed.  There is now a separate preference file called: WC Twitter Uploader prefs.scpt.  It needs to be put in this folder:

~/Applications/WeatherCat Scripts/WeatherCat Script Library/WeatherCat Script Prefs

Is that where you have created your Twitter string and set the other preferences?  I know of folks using WC Twitter Uploader using metric units and I looked over the code, it doesn't override your preferences.  So you should be able to get what you want out of the AppleScript. 

Please take another look at the revised documentation and let me know if I can further help you.

Cheers, Edouard  [cheers1]

faymondo

  • Gentle Breeze
  • **
  • Posts: 36
Re: WeatherCat Scripts *BETA* of 2012-04-30
« Reply #33 on: June 13, 2013, 04:50:35 PM »
My tweets stop showing on Twitter on June 11th. Somebody has suggested it's because Twitter has ended the V1 API. Can anybody provide an update on this ?

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
JA Computing library broken. (Re: WeatherCat Scripts *BETA*)
« Reply #34 on: June 13, 2013, 10:24:42 PM »
Dear Faymondo and WeatherCat twitter fans,

My tweets stop showing on Twitter on June 11th. Somebody has suggested it's because Twitter has ended the V1 API. Can anybody provide an update on this ?

My AppleScripts use a library from J.A. Computing to actually interact with Twitter:

http://www.jacomputing.net/

The versions of the AppleScript libraries were out of date in my AppleScripts.  However, I just updated them and still no automated Twit is posted.  I fear that your suspicion is correct and the J.A. Computing libraries are using V-1 of the Twitter API.  Since my AppleScript is completely dependent on that library - there is nothing I can do.  Sorry, we'll just have to wait and see if J.A. Computing can come up with version of their library that works with the Twitter current API.

Sorry gang.  :(

Cheers, Edouard

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Update from J.A. Computing (Re: WeatherCat Scripts 2012-04-30)
« Reply #35 on: June 13, 2013, 11:26:02 PM »
Dear fans of my beleaguered AppleScripts,

I sent an inquiry to Jesse Almanrode of J.A. Computing to see if there was any hope if getting ASTwitterLibrary library working again. I just got this reply:

Quote
Thanks for the email.  Actually, I am currently in the process of getting ASTwitterLibrary working with version 1.1 of the Twitter API.  Twitter shutting down 1.0 was a little surprising and I was hoping they would hold off longer than they did.  According to Twitter the switch to 1.1 should be seamless but, alas, it isn't. 

I don't have a timeframe for the update at the moment but wanted to let you know that I am (and was) already working on getting this working again.  I know we AppleScripters are a dying breed and scripts like ASTwitterLibrary (and ASObject) are the last of their kind.

Thanks again for using ASTwitterLibrary and ASObject.

So while our weather Twits will be down for some time, there is hope that they will be back on line in the not too distant future.

Cheers, Edouard  [cheers1]

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: WeatherCat Scripts *BETA* of 2012-04-30
« Reply #36 on: June 14, 2013, 01:47:22 AM »
Thanks for checking with the source and getting the definitive answer, Edouard.

Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook