Re: Yosemite appears to have broken shell script
Re: Yosemite appears to have broken shell script
- Subject: Re: Yosemite appears to have broken shell script
- From: Shane Stanley <email@hidden>
- Date: Wed, 29 Oct 2014 09:41:52 +1100
On 29 Oct 2014, at 9:10 am, Robert Poland <email@hidden> wrote:
This shell script has worked for ages, now it errors.
Script error>> Applescript error number 1: The command exited with a non-zero status..”.
Script>> tell (do shell script "/usr/sbin/system_profiler SPDisplaysDataType | grep Resolution") to set {newR, newB} to {word 2, word 4 as number} -- get screen size for monitor
It works here, so it's not a Yosemite problem.
This is a quicker, easier method:
use framework "AppKit" -- for NSScreen
set {newR, newB} to (current application's NSScreen's mainScreen()'s frame()'s |size|()) as list |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden