Trixology

General Category => General Discussion => Topic started by: Randall75 on July 20, 2016, 11:02:18 PM

Title: OSXversion$
Post by: Randall75 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]
Title: Yet another "Cupertino moment" (Re: OSXversion$)
Post by: elagache 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]
Title: Re: OSXversion$
Post by: xairbusdriver 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?
Title: Re: OSXversion$
Post by: Bull Winkus 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]
Title: Re: OSXversion$
Post by: Randall75 on July 21, 2016, 01:12:06 PM
Herb
 Where are you seeing this at?


cheers


 [cheers1]
Title: Re: OSXversion$
Post by: xairbusdriver 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. (http://i1327.photobucket.com/albums/u666/xAirbusDriver/dont_know_zpsqsndnufj.gif) Maybe change it once a year? :)
Title: Re: OSXversion$
Post by: Randall75 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]


 
Title: Re: OSXversion$
Post by: xairbusdriver on July 21, 2016, 02:55:54 PM
I did guess that! [cheer] "Maybe" #4! [lol] I fear AS may-be on life support. :(
Title: Re: OSXversion$
Post by: Bull Winkus 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]
Title: Re: OSXversion$
Post by: xairbusdriver 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 (http://www.soma-zone.com/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.
Title: Re: OSXversion$
Post by: xairbusdriver 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.
Title: Re: OSXversion$
Post by: Steve 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.)
Title: Re: OSXversion$
Post by: Randall75 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]
Title: Coming from different sources (Re: OSXversion$)
Post by: elagache 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 . . . . (http://www.canebas.org/WeatherCat/Forum_support_documents/Custom_emoticons/pout.gif)

Oh well, . . . . . Edouard
Title: Re: OSXversion$
Post by: xairbusdriver 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?
Title: Re: Coming from different sources (Re: OSXversion$)
Post by: Steve on July 22, 2016, 03:49:11 PM
Somebody at Apple simple goofed on something really basic.

Nope. As I said, mine works fine, so something is screwy with Randall's script. On a few occasions, I've had the AppleScript Tag Processor script or Status Growler script quit on me and not be able to relaunch. In those cases, I've had to download the original script, and save it as a new script application to get it to run. Maybe something similar has occurred for you, Randall.
Title: Re: OSXversion$
Post by: Randall75 on July 22, 2016, 04:47:17 PM
Hi Steve
 I've tried that every things works except the OSXversion$ tag it is stuck on 10.11.4
I am running a 2011 iMac 21.5" i5 core 8 megs of ram 10.11.6 so for now I opened it console html and removed the tag and just inserted 10.11.6 to get it to show up correctly on my web site


thanks for the suggestion


cheers


 [cheers1]


Title: Re: OSXversion$
Post by: xairbusdriver on July 22, 2016, 07:22:35 PM
Randall,

Did you try running just the script Edouard posted (#13)? [banghead] It didn't work for me, but it seems to be working for some. Strange. :o
Title: Re: OSXversion$
Post by: awilltx on July 22, 2016, 08:19:24 PM
If you just want to test the value, open Script Editor, paste this code


Code: [Select]


set OSXversion to system version of (system info)
 return (OSXversion)


And run. It should return the correct value.


Alan
Title: Need one more line to stand alone (Re: OSXversion$)
Post by: elagache on July 22, 2016, 08:22:11 PM
Dear X-Air, Randall, Alan and WeatherCat scripters,

I am assuming the script can run independently.

Unfortunately no you could not assume that.  I just grabbed the function out of the WC Status Growler script to show the method I used.  However, if you want to run it as a stand alone script this will work:

Code: [Select]
getOSXversion()

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

When I run it in the script editor is gives me the correct version since I'm still running Yosemite.

So what do you guys get on El Capitan?

Cheers, Edouard
Title: Re: OSXversion$
Post by: xairbusdriver on July 22, 2016, 08:39:24 PM
I will confirm that Edouard's second script does work. The original script in post #13 lacked the "getOSXverion()" function call, so the next line would always be null/0/invalid. That still leaves Randall with an inop script. If he can get the modified script to run or even the short version, I'd say he's suffering from a non-operational/non-running script for some reason. I only use one AS and a launch agent/daemon opens and runs it and lets it close on its own.
Title: Re: OSXversion$
Post by: awilltx on July 22, 2016, 08:40:17 PM
Either the two lines I copied or the full function you just posted will work. Mine returns "10.11.6" which is correct.


Alan
Title: Re: OSXversion$
Post by: xairbusdriver on July 22, 2016, 08:47:51 PM
Quote from: xairbus
I am assuming the script can run independently.
Quote
Unfortunately no you could not assume that
But of course, I could. I actually did! :) I stated that as a condition for the author/experts/authorities to verify. All "questions" don't end with a question mark. [banghead] [cheer] [lol] What is the point of posting code that would not run as posted? Note: That is a question, kind sir.
Title: Re: OSXversion$
Post by: Blicj11 on July 22, 2016, 08:57:55 PM
Either the two lines I copied or the full function you just posted will work. Mine returns "10.11.6" which is correct.

Same here: 10.11.6 displays as it should.
Title: Re: OSXversion$
Post by: Randall75 on July 22, 2016, 09:18:20 PM
Edouard
 What is the latest version of your script I have 10.9 beta


cheers


 [cheers1]
Title: Nothing officially new since 2013 (Re: OSXversion$)
Post by: elagache on July 23, 2016, 10:44:44 PM
Dear Randall and WeatherCat scripters,

What is the latest version of your script I have 10.9 beta

There hasn't been an official release of the WeatherCat scripts since December 2013.  You can still download them from this thread:

http://athena.trixology.com/index.php?topic=1039.0 (http://athena.trixology.com/index.php?topic=1039.0)

Sorry guys, I wish I could get back to these scripts but the health of family members has continued to degrade which gives me more and more to do.  Also there is that certain other "dependent" that definitely isn't cooperating . . . . (http://www.canebas.org/Automotive/V8_Buick/Misc/Biquette_V8_Buick_signature.gif)

Oh well, . . . . Edouard (http://www.canebas.org/WeatherCat/Forum_support_documents/Custom_emoticons/sigh_bubble.gif)

Title: Re: OSXversion$
Post by: Randall75 on July 25, 2016, 02:02:51 AM
Hi Edouard
 Thanks for the info on the WC Growler
Changed the set OSXversion to system version of (system info)
And that did the trick


cheers


 [cheers1]
Title: Re: OSXversion$
Post by: Blicj11 on July 25, 2016, 03:52:00 PM
And that did the trick

Glad to see you have a resolution Randall.
Title: Glad you are back in business! (Re: OSXversion$)
Post by: elagache on July 25, 2016, 10:57:15 PM
Dear Randall, Blick, and WeatherCat scripters,

Thanks for the info on the WC Growler
Changed the set OSXversion to system version of (system info)
And that did the

I"m glad that solved your problem Randall!  :)

Cheers, Edouard  [cheers1]