Author Topic: OSXversion$  (Read 3620 times)

Randall75

  • Storm
  • *****
  • Posts: 1203
  • CWOP-CW6734 WeatherUnderground-KOHNEWAR6
    • CW6734
    • KOHNEWAR6
    • Randy's Weather On The Hill
  • Station Details: Davis Vantage Pro 2 Plus.iMac i5 Sierra 10.12.6 8GB Ram, WeatherCat 3,Logitech 9000 Pro Web Cam
OSXversion$
« on: July 20, 2016, 11:02:18 PM »
At Edouard and Stu and anyone else that might know the answer


Why won't OSXversion$ update past 10.11.4?
I have had 11.5 and now 11.6 installed but it stills show 10.11.4?
HELP  [biggrin]


cheers


 [cheers1]

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
Yet another "Cupertino moment" (Re: OSXversion$)
« Reply #1 on: July 20, 2016, 11:50:27 PM »
Dear Randal and WeatherCat "I miss Steve Jobs and How!" types, . . .

Why won't OSXversion$ update past 10.11.4?
I have had 11.5 and now 11.6 installed but it stills show 10.11.4?

Sadly the guys at Apple simply goofed and forgot to update that in the OS upgrade.  It should do that sort of thing automatically.  If not, there should be a checklist somewhere in Apple and no version of OS-X (macOS) should get out the door without all items on the checklist confirmed as completed.

But don't worry, Apple is so busy building that ultra safe self-driving car (using the very same fail safe system to make sure they don't make any mistakes . . . . ) [rolleyes2]

Just another reason to stick to my mature but trusty Buick!  [bounce]

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 2198
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.13.4/WC 3.0
Re: OSXversion$
« Reply #2 on: July 21, 2016, 02:34:17 AM »
Nice as it is for Stu to include all those tags, perhaps a simple hard-coded "OS X whatever" is more foolApple-proof? ;) Where is that on your site, anyway?

Bull Winkus

  • Storm
  • *****
  • Posts: 782
    • EW0095
    • KARHORSE2
    • WU for Horseshoe Bend, Arkansas
  • Station Details: Davis Wireless Vantage Pro 2, iMac 24"
Re: OSXversion$
« Reply #3 on: July 21, 2016, 06:08:19 AM »
I just yesterday bumped the Cat's underpinnings from 10.11.4 to 10.11.6. It shows 10.11.6 now.

Just sayin'
 [cheers1]
Herb

Randall75

  • Storm
  • *****
  • Posts: 1203
  • CWOP-CW6734 WeatherUnderground-KOHNEWAR6
    • CW6734
    • KOHNEWAR6
    • Randy's Weather On The Hill
  • Station Details: Davis Vantage Pro 2 Plus.iMac i5 Sierra 10.12.6 8GB Ram, WeatherCat 3,Logitech 9000 Pro Web Cam
Re: OSXversion$
« Reply #4 on: July 21, 2016, 01:12:06 PM »
Herb
 Where are you seeing this at?


cheers


 [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 2198
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.13.4/WC 3.0
Re: OSXversion$
« Reply #5 on: July 21, 2016, 02:37:06 PM »
[lol2] I guess one reason I've never used that tag is because I never found it in the Manual (27th June 2015, Version 2.2.0). Didn't see an update to the manual when I downloaded 2.3. Sounds like it's been around for some time, however.

Maybe in the ßeta? Maybe in the Wiki? Maybe a post from Stu? Maybe it's an AppleScript thang? Maybe I'll add it to the specs details of the computer running WC. Maybe change it once a year? :)

Randall75

  • Storm
  • *****
  • Posts: 1203
  • CWOP-CW6734 WeatherUnderground-KOHNEWAR6
    • CW6734
    • KOHNEWAR6
    • Randy's Weather On The Hill
  • Station Details: Davis Vantage Pro 2 Plus.iMac i5 Sierra 10.12.6 8GB Ram, WeatherCat 3,Logitech 9000 Pro Web Cam
Re: OSXversion$
« Reply #6 on: July 21, 2016, 02:41:52 PM »
Xair
 What I'm talking about is in one of Edouard's Scripts. that shows up in the console html on my web site.


cheers


 [cheers1]


 

xairbusdriver

  • Storm
  • *****
  • Posts: 2198
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.13.4/WC 3.0
Re: OSXversion$
« Reply #7 on: July 21, 2016, 02:55:54 PM »
I did guess that! [cheer] "Maybe" #4! [lol] I fear AS may-be on life support. :(

Bull Winkus

  • Storm
  • *****
  • Posts: 782
    • EW0095
    • KARHORSE2
    • WU for Horseshoe Bend, Arkansas
  • Station Details: Davis Wireless Vantage Pro 2, iMac 24"
Re: OSXversion$
« Reply #8 on: July 21, 2016, 04:27:32 PM »
Hey, Randall, I was looking at the "About this Mac" selection from the Apple menu. Sorry. I didn't realize you were talking script. Can't help you there. That's another language for me.

 [cheers1]
Herb

xairbusdriver

  • Storm
  • *****
  • Posts: 2198
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.13.4/WC 3.0
Re: OSXversion$
« Reply #9 on: July 21, 2016, 04:45:49 PM »
You can get this info via Terminal with the "sw_vers" command. The output will be similar to this:
Code: [Select]
yourLoggedInUserName$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.5
BuildVersion:   15F34
I think AS can get this info and parse it down to what you want and write a file to your space. It would be a very simple php script to read the file and insert it anywhere you want on any of your pages.

I use a nice little app called <LaunchControl> to run an AS ~60 seconds to write a file with the computer uptime. WC automatically includes that file when it sends other data every two minutes. Of course, once you get the info to your web site, you can do whatever you want with it.

xairbusdriver

  • Storm
  • *****
  • Posts: 2198
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.13.4/WC 3.0
Re: OSXversion$
« Reply #10 on: July 21, 2016, 05:45:14 PM »
This script might work for you.
Code: [Select]
set OSInfo to do shell script "sw_vers"
-- This gets the following three lines of text:
--ProductName: Mac OS X
--ProductVersion: 10.11.x
--BuildVersion: 12xyz

set OSVersion to (characters 39 thru 46 of OSInfo) as string
-- Get just these characters, duplicate and modify to get other parts.
-- set OS to (characters 14 thru 21 of OSInfo) as string -> "Mac OS X"

set thePath to (path to desktop as Unicode text) & "OS_Info.txt"
set fRef to (open for access file thePath with write permission)
try
set eof fRef to 0
write (OSVersion) to fRef
end try
close access fRef
The real problem is how often you want it to run. LaunchControl can run the script when you want. It's just not going to change more than a few times a year, I'd hope! And you really never know how often that will happen. Just seems easier to place the value in the html.

Is Edouard has provided you with an AS, perhaps you can change it to use the "sw_vers" shell command and maybe the second line to get rid of everything except the OS number. Be advised that line could change if the version number exceeds 10.11.9! [lol]

Hope this helps.

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: OSXversion$
« Reply #11 on: July 21, 2016, 06:16:26 PM »
Randall,

Edouard's status script reports the correct OS for me on my station status page (linked in my sig.)
Steve - Avon, Ohio, USA


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

Randall75

  • Storm
  • *****
  • Posts: 1203
  • CWOP-CW6734 WeatherUnderground-KOHNEWAR6
    • CW6734
    • KOHNEWAR6
    • Randy's Weather On The Hill
  • Station Details: Davis Vantage Pro 2 Plus.iMac i5 Sierra 10.12.6 8GB Ram, WeatherCat 3,Logitech 9000 Pro Web Cam
Re: OSXversion$
« Reply #12 on: July 21, 2016, 08:55:44 PM »
Hi Steve
 Can't get it change from 10.11.4 here I've tried anything here reinstalling the script but can't get to change so I don't know


cheers


 [cheers1]

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
Coming from different sources (Re: OSXversion$)
« Reply #13 on: July 21, 2016, 10:44:18 PM »
Dear Herb, Randal, and WeatherCat add-on junkies,

I just yesterday bumped the Cat's underpinnings from 10.11.4 to 10.11.6. It shows 10.11.6 now.

Where are you seeing this at?

I'm not sure what Herb is looking at, but OSXversion$ is being generated by my WC Status Growler AppleScript.  It is, in turn, asking the system to identify itself via an AppleScript standard call.  Here is my function that retrieves the operating system version - it is as simple as can be:

Code: [Select]
on getOSXversion()
-- - - - - -
-- Function to query Finder for version of OS-X
-- running on Mac
-- - - - - -
local OSXversion
set OSXversion to system version of (system info)
return (OSXversion)
end getOSXversion

This simply should be never incorrect.

Somebody at Apple simple goofed on something really basic.  Definitely very disappointing . . . .

Oh well, . . . . . Edouard

xairbusdriver

  • Storm
  • *****
  • Posts: 2198
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.13.4/WC 3.0
Re: OSXversion$
« Reply #14 on: July 21, 2016, 11:43:42 PM »
Edouard,

I pasted your function into Script Editor and added "set result to OSXversion". I get the following output: error "The variable OSXversion is not defined." number -2753 from "OSXversion"

I am assuming the script can run independently.

What do you get?