Author Topic: AppleScript users - willing to install 'smile'?  (Read 9722 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
AppleScript users - willing to install 'smile'?
« on: March 27, 2012, 06:35:35 PM »
Dear WeatherCat AppleScript users,

I sent a very small AppleScript to Reinhard to see if he could translate it and . . . . . it was an immediate - mess!!  [banghead]

I've ranted a bit of AppleScript's deficiencies , but this particular blow seems hard to ignore.  Basically it is impossible to translate the strings used in my AppleScripts because these strings include data that needs to be inserted into the strings at different places depending upon the language.

Apple's Xcode environment provides a way to do this automatically, but AppleScript . . . . .

Okay, I could implement this within AppleScript myself, but . . . . . I need some way to do substitutions within strings and . . . . . take a wild guess as to whether or not AppleScript has any easy way to do that . . . . .  :o

Thus bringing me to my question.

There is a French company called Satimage that has written an AppleScript editor called Smile.  Smile comes with some really helpful AppleScript libraries that do things like implement most of the mathematical functions "standard" in other programming languages but missing in AppleScript.  It also includes a reasonable string manipulation package.  Smile can be downloaded for free, but I've shied away from using it, because of the additional hassle factor for you'all.

Now my back is really against the wall, so I've gotta ask.  Would AppleScript users be willing to download and install this in order to use my AppleScripts?  I've had it installed on my computer for years, works fine.  This company has never nagged for using their free software.  I don't understand how they make a living, but they've been around for ages, so I hope they won't disappear tomorrow.

So what do you'all feel?  can I add one more prerequisite on you? 

Curious minds want to know!  [bounce]

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: AppleScript users - willing to install 'smile'?
« Reply #1 on: March 27, 2012, 07:17:35 PM »
Count me in! Anything to make the AppleScripts work better, and is easier for you is fine with me!

Steve
Steve - Avon, Ohio, USA


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

wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: AppleScript users - willing to install 'smile'?
« Reply #2 on: March 27, 2012, 07:46:45 PM »
We are not that quick on the trigger, slow down.  ;D

Just sent you some translations that are indeed practicable, I think. On the other side I second Steve: All things that can make AppleScript easier is welcome! But think about the following: We need to install WeatherCat (what else?  [cheers1] ), Growl, now Smile... what comes next?
Reinhard


Randall75

  • Storm
  • *****
  • Posts: 1332
  • CWOP-CW6734 WeatherUnderground-KOHNEWAR6
    • CW6734
    • KOHNEWAR6
    • Randy's Weather On The Hill
  • Station Details: Davis Vantage Pro 2 Plus.iMac i5 OS High Sierra 10.13.6 8GB Ram, WeatherCat 3,Logitech 9000 Pro Web Cam
Re: AppleScript users - willing to install 'smile'?
« Reply #3 on: March 27, 2012, 10:03:35 PM »
It's been downloaded ready to go
 [cheers1]

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
AppleScript and "high-maintenance" (Re: willing to install 'smile'?)
« Reply #4 on: March 27, 2012, 10:09:08 PM »
Howdy Reinhard, Steve, Randall, and WeatherCat AppleScript fans,

We are not that quick on the trigger, slow down.  ;D

 ;) Why pardner if you aren't quick on the draw - your' bones will glisten on the trail here in the ol' West!!  [lol2]

Just sent you some translations that are indeed practicable, I think.

Well, thanks I appreciate that, but as I can state and Steve can corroborate, there is a LOT of text in these 6 AppleScripts.   I doubt you'll be able to produce anything more than high-school student German if you have to be stuck in the straightjacket of having the weather data in the position where English phrases would require them.  So the problem won't go away.  It is only a matter of time before one of these AppleScripts would be beyond translation.

On the other side I second Steve: All things that can make AppleScript easier is welcome! But think about the following: We need to install WeatherCat (what else?  [cheers1] ), Growl, now Smile... what comes next?

Well . . . . . . . . .

If you have to ask, what is running on my computer already has two other new goodies: Lynxlet and MtcMail.  However, both are free and it appears I can just include them in the distribution of the AppleScripts themselves.  Lynxlet is a version of the open-source Lynx web browser and I use it to get back error messages from web upload services like UK Met Office, PWS Weather, and WeatherBug.  MtcMail is an alternative to scripting Apple Mail, thus eliminating the need to leave Apple Mail running all the time.

As I said, I've tried to avoid asking folks to install Smile because it requires a separate installer.  This folks would have to do in addition to installing my AppleScripts.  However, I think it might be worth it for anyone interested in using AppleScripts because of the additional math functions.  Unless you install smile you won't have any way to compute things like: sin, log10, and gamma.  Should someone need to extend WeatherCat to preform some quick scientific calculation, these functions are essentially required.  So it might be a good idea to have everyone who might ever use AppleScript, bite the bullet and install Smile as well.

At the same time, Reinhard's points seem really important.  These "AppleScripts" are rapidly outgrowing what AppleScript was really intended to do.  I've been hoping for months to bite the bullet, learn Xcode and convert at least some of these scripts into WeatherCat extensions like the banner generator.  Those extensions will be easily translatable because Xcode provides the proper facilities for such things.

It doesn't look that difficult to implement a way to provide reasonable localization of strings in AppleScript using the tools provided by Smile.  However, it is another investment in an environment that seems increasingly a dead-end.

So perhaps I should ask Reinhard and the other non-English WeatherCat users - how anxious are you to get access to the "goodies" associated with these AppleScripts?  Some scripts like WC Web Uploader are probably usable by anyone who knows enough English to get WeatherCat going in the first place.  However, other scripts like WC Temperature Rising and WC Temperature Falling would be unpleasant to use outside of your native language.  Is there enough interest in localized scripts for one more "band-aid" in AppleScript before changing to Xcode?

Once more: opinions solicited!!  [bounce]

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: AppleScript users - willing to install 'smile'?
« Reply #5 on: March 27, 2012, 11:32:55 PM »
I couldn't find any iso at the above link, so here's a direct link to the smile software page:
http://www.satimage.fr/software/en/index.html
Steve - Avon, Ohio, USA


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

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
That's a feature - not a bug!! (Re: install 'smile'?)
« Reply #6 on: March 28, 2012, 12:06:03 AM »
Howdy Steve, Randall, and WeatherCat AppleScript fans!  [cat]

I couldn't find any iso at the above link, so here's a direct link to the smile software page:
http://www.satimage.fr/software/en/index.html

 ;) Sufferin' succotash!!  There weren't supposd' ta' be no darn download link!!  I was only askin'!!  [lol2]

Uh seriously, I really was just asking if folks wouldn't mind to download smile.  I didn't provide a download link because - I didn't know if folks wanted to bother or not!!  [biggrin]

It's been downloaded ready to go

Should I take that as a . . . . . . . . .  [lol]

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: AppleScript users - willing to install 'smile'?
« Reply #7 on: March 28, 2012, 12:11:46 AM »
I just wanted to read about it, and there didn't seem to be any way to get to the latter link from the former. I downloaded 3.6 but the read me says it is 3.5. Then the web site says 3.5 only works on Leopard or Snow Leopard. I didn't install it at this time. Just looking at what it is.
Steve - Avon, Ohio, USA


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

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
Oops, that could be a deal-breaker (Re: install 'smile'?)
« Reply #8 on: March 28, 2012, 12:21:51 AM »
Howdy Steve and WeatherCat AppleScripts fans,

I just wanted to read about it, and there didn't seem to be any way to get to the latter link from the former. I downloaded 3.6 but the read me says it is 3.5. Then the web site says 3.5 only works on Leopard or Snow Leopard. I didn't install it at this time. Just looking at what it is.

Oops!!  :-[ I hadn't thought about Lion issuez.  If it doesn't work with Lion, that would definitely be a deal-breaker.  Okay, I'll try to poke around and find out.

Cheers, Edouard  [cheers1]

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
da' Lion and . . . . more!! (Re: install 'smile'?)
« Reply #9 on: March 28, 2012, 12:45:09 AM »
Howdy WeatherCat AppleScript fans,  [cat]

Sorry to be spamming the forum, but just came an appropriate Read Me page for Smile 3.6: http://www.satimage.fr/software/en/releases/releasesmilex_36.html
It reports Lion compatibility.

Better still, Smile now incorporates SmileLab which among other things includes: plotting!!  [bounce]

All this is still free!

So the plot has considerably thickened . . . .

Stay tuned!

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: da' Lion and . . . . more!! (Re: install 'smile'?)
« Reply #10 on: March 28, 2012, 01:53:00 AM »
Steve - Avon, Ohio, USA


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

The Grand Poohbah

  • Gale
  • ****
  • Posts: 385
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: AppleScript users - willing to install 'smile'?
« Reply #11 on: March 29, 2012, 12:29:31 AM »
elagache states "Would AppleScript users be willing to download and install this in order to use my AppleScripts?" I honed in on the word "use". I understand that Smile is required to edit the scripts, but is it required to run them too? That seems to be an odd requirement. Just checking.

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
It's a "package" deal (Re:willing to install 'smile'?)
« Reply #12 on: March 29, 2012, 01:02:27 AM »
Hello Grand Poohbah,

Good point, let me explain . . . .

elagache states "Would AppleScript users be willing to download and install this in order to use my AppleScripts?" I honed in on the word "use". I understand that Smile is required to edit the scripts, but is it required to run them too? That seems to be an odd requirement. Just checking.

Actually, you are right.  What I would want folks to install isn't Smile itself, but some AppleScript extension libraries.  However, installing the llbraries separately would be a bit of a hassle.

The other reason to install Smile is that it is an extension to the AppleScript language that can be used to do scientific calculation and plotting.  It can be scripted from an AppleScript to make graphs like this:



Since the ability to make graphs of your own from WeatherCat data could be very interesting to lots of folks, it seems like a worthwhile item to install especially given the price . . . . . free!!  [bounce]

Seem like a reasonable request?

Cheers, Edouard  [cheers1]

P.S.  What puzzles me is that not so long ago, they were asking for hundreds of dollars for this software.  Sure hope these guys have some scheme to stay in business!!

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
Right way or wrong way? (Re: willing to install 'smile'?)
« Reply #13 on: April 05, 2012, 07:52:56 PM »
Dear WeatherCat AppleScript fans,  [cat]

I'm definitely pushing AppleScript about as far as Apple has allowed it to go.  So I think at least some of what is now AppleScripts will eventually need to be rewritten in Objective-C as WeatherCat add-ons like the banner generator.  However, right now there is now a copious collection of AppleScripts that folks have gotten addicted to and at the moment they cannot be properly translated into other languages.

I started this thread asking what folks thought about installing the Smile editor.  It has an implementation of the C printf command needed to make translations straightforward.  It is possible to avoid this installation entirely but the AppleScripts will be significantly slower because every string to be displayed would require launching a UNIX command.  It is unlikely anyone would notice, but on slow machines this could push these scripts into being resource and CPU hogs.

More importantly from my point of view, AppleScript completely lacks transcendent functions like sin, log and so on.  Given that Meteorology is a science that uses this sort of mathematics, soon or later someone will want to be able to use AppleScript to encode some bit of math like this and . . . . . without the smile extensions - it is going to be nearly impossible to do this.  Add to that the smile graphing capabilities, it seems like this an extension that would be worth the installation hassles.  It is one program that comes with a standard Mac installer.  Install it and you're all set.

I've come up with a solution that works even on computers that don't have smile installed.  However, the folks at MacScripters.net don't like it.  Alas, nobody has given me a technical reason why my implementation is a bad idea.  The objections are ideological - so I'm not exactly convinced.

So I have two choices.  I could continue with the implementation that Steve is running right now on his machine with no ill-effects apparently, or give up on gaining the speed advantages when folks have smile installed and always translate strings da' slow way

You are the folks who are going to end up using these AppleScripts, what would you prefer?  Would you'all prefer a slow but bullet-proof translation scheme, or do you prefer to have a "fast lane" option?

Curious minds would like to know!!  [bounce]

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: AppleScript users - willing to install 'smile'?
« Reply #14 on: April 05, 2012, 08:46:20 PM »
Well, I always like learning new things and pushing the envelope of what I know how to do and what the software can do. So I'm in the latter camp. But what I'm testing now mostly works with what we ask of it today, so that certainly is the easiest thing to do and asks less of you and your time.

Steve
Steve - Avon, Ohio, USA


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