• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Finder window column widths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Finder window column widths


  • Subject: Re: Scripting Finder window column widths
  • From: Gnarlodious <email@hidden>
  • Date: Fri, 28 Jul 2006 23:09:22 -0600

On 7/28/06, Laine Lee <email@hidden> wrote:
On 6/21/06 3:10 PM, "Gnarlodious"  wrote:


> set desktopWidth to (word 3 of (do shell script "defaults read > /Library/Preferences/com.apple.windowserver | grep -w " & "Width")) as > number > set desktopHeight to (word 3 of (do shell script "defaults read > /Library/Preferences/com.apple.windowserver | grep -w " & "Height")) > as number >

Depending on your system version, you might have better results if you
change this part to use the construct submitted by Kai a couple of days ago:

tell (do shell script "/usr/sbin/system_profiler SPDisplaysDataType |  grep
Resolution") to set {wd, ht} to {word 2 as number, word 4 as number}
set screenz to result
set desktopWidth to (item 1 of screenz)
set desktopHeight to (item 2 of screenz)

Result is the same, but my method seems significantly faster.

But you can actually say one line:

tell (do shell script "/usr/sbin/system_profiler SPDisplaysDataType |
grep Resolution") to {word 2 as number, word 4 as number}

--> {1200, 1920}

Interesting technique, thanks. I just don't know why they call it
"Resolution" when it is actually "Screen Size". Seems like Resolution
should return 100ppi, or some such thing.

-- Gnarlie
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Scripting Finder window column widths
      • From: kai <email@hidden>
References: 
 >Re: Scripting Finder window column widths (From: Laine Lee <email@hidden>)

  • Prev by Date: Claudio Braxmaier ist bis 21.08.2006
  • Next by Date: FileMaker Web Viewer
  • Previous by thread: Re: Scripting Finder window column widths
  • Next by thread: Re: Scripting Finder window column widths
  • Index(es):
    • Date
    • Thread