• 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
screen size available (without dock)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

screen size available (without dock)


  • Subject: screen size available (without dock)
  • From: "koenig.yvan" <email@hidden>
  • Date: Thu, 20 Mar 2014 12:28:00 +0100

Hello

I found this piece of code :

tell application "Safari"
-- Determine space open on your screen, factoring in the Dock
set screenWidth to do _javascript_ "screen.availWidth" in document 1
set screenHeight to do _javascript_ "screen.availHeight" in document 1
end tell

It works well but I wish to know if we may get the same infos without _javascript_.

I was hoping to get useful datas thru :

tell application "System Events" to tell dock preferences
dock size
--> 0.045454546809
end tell

and I don't know how to convert this decimal value in points.
According to what is returned by _javascript_ the width of the Dock is 39 points.

Yvan KOENIG (VALLAURIS, France) jeudi 20 mars 2014 12:27:47









 _______________________________________________
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

  • Follow-Ups:
    • Re: screen size available (without dock)
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: folder copy
  • Next by Date: Bounds_of_Document_QXP10
  • Previous by thread: Re: folder copy
  • Next by thread: Re: screen size available (without dock)
  • Index(es):
    • Date
    • Thread