Interesting unix changes in Yosemite

Hi,

BTW, while the adrenaline is flowing, does anyone know of any new interesting changes in unix commands for Yosemite. I’'ve been looking through the man pages for old commands and couldn’t find any so far.

Thanks.
kel

pwpolicy has had a massive overhaul, and, as well as more transparent policies, you can now use rulesets matching AD type functionality.

Hello.

MacError was introduced with Mavericks I believe.

caffeinate I believe is also being introduced into the standard toolset, it used to be on an ‘extra-feed’ at developer.apple.com, but now it is put back into a standard package.

I have to say, that maybe those utilities are installed with the developer tools, and that Regulus6633 has written a solution for showing error codes to AppleScripters that is superior, since he shows the Carbon error codes, in addtion, which are so much more relevant to AppleScripters.

Hello.

For the record, posterity, and prosperity! You can find Regulus’s script here. :slight_smile:

Hello

It seems that I am an ass.
I grabbed the Regulus’s script and tried to use it.

I entered a classical error code -1750 and it returned “The error numbered -1750 could not be found”
although everybody knows that : Mac OS error -1750 (errOSASystemError): errOSASystemError

What am I doing wrongly ?

Yvan KOENIG (VALLAURIS, France) mercredi 8 avril 2015 15:09:02

Apple removed some public headers from the frameworks in /System/Library/Frameworks in Yosemite, so Spotlight could’t find them

I didn’t know that, I’m sorry, I thought it still work, because it does so on Mavericks, which I operate on.

Hopefully one could find the header file from Carbon still in there somwhere, and edit the global errorFilesList variable. :confused:

For the Record: The error codes are only for native/core AppleScript and AppleEvent errors. They are meaningless when an error occurs in any other context than AppleScript itself. For instance an error returned from an application or a do shell script has no relation with the error description found by the Regulus6633’s script. If anyone is interested in using it, use it wisely.

This is a very simple script to get AppleScript error messages by number from a public website


set errorNumber to text returned of (display dialog "Enter error number" default answer "" buttons {"Cancel", "OK"} default button "OK")
try
	errorNumber as integer
	if errorNumber does not start with "-" then set errorNumber to "-" & errorNumber
	set errorMessage to " Error not found"
	set errorList to paragraphs of (do shell script "curl http://whitefiles.org/b1_s/1_free_guides/fg3mo/pgs/v02_aserr.htm | textutil -stdin -stdout -convert txt -encoding UTF-8")
	repeat with i from 1 to count errorList by 3
		set currentError to item i of errorList
		if errorNumber = currentError then
			set errorMessage to item (i + 1) of errorList
			exit repeat
		end if
	end repeat
	display alert "Error " & errorNumber message errorMessage
on error
	display alert errorNumber & " is no number"
end try


Interesting that there were so few interesting unix additions, as in Mavericks (caffeinate). Yes, quite sure they added it there. Also, there where the additional applications and changes in Xcode. I’ll have to look into this MacError thing.

Edited: and btw, the new update 10.10.3 must have had some changes to Script Editor. Still looking into that.

Thanks a lot,
kel

Why do you say that? Wasn’t it version 2.7 before?

This is really not conforming to the thread, but the best that happened to Yosemite, was that Apple closed a glitch, that may enable someone to get backdoor access. However, they won’t fix this for Mavericks, and earlier.

This backdoor elevation of privileges, only works if you have administrator privileges on your account. So, you shouldn’t use your normal account with Administrator privileges. [url=https://news.ycombinator.com/item?id=9347669]https://news.ycombinator.com/item?id=9347669[/url]

Hi Shane,

I meant that the new update to os 10.10.3.

The reason why I say that is that after I updated, the icon for Script Editor in Dock changed to a question mark. I assumed that something must have changed with Script Editor. Not sure, that’s why I’m still checking it out.

Anyway, what I did is remove the question mark for Script Editor from Dock and dragged the new icon back in. It may have just been something with the icon or what I was suspecting was that maybe it had something to do with the changes in Xcode.

g’day,
kel

I saw the same thing, which is why I checked the version number. Strange.

Hi Shane,

Thanks for the verification. Nice to know I’m not imagining things. :smiley:

kel

In contrast: The bug is created by Apple in Lion.

Hello.

I’t really doesn’t help with removing the administrator privileges. The only thing that helps, is to upgrade to 10.3, because Apple refuses (so far) to fix the bug on earlier versions of Os X.