• 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: How to maximize Safari windows?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to maximize Safari windows?


  • Subject: Re: How to maximize Safari windows?
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 7 May 2008 20:42:00 +0200


Le 7 mai 2008 à 20:31, Luther Fuller a écrit :

On May 7, 2008, at 11:01 AM, Jim Krenz wrote:
Is there a way to make Safari expand its window to fill the screen (but respect the dock's location) on the monitor it is presently on?

I've found this script that uses the zoom feature, but I want to maximize the Safari window, not just zoom it.

tell application "System Events" to click (first button whose subrole is "AXZoomButton") of (first window whose subrole is "AXStandardWindow") of (first process whose frontmost is true)

I once had that problem with lots of applications. Scroll bar hidden behind DragThing at the bottom of the screen, &c. So I wrote a script to resize any application's front window to the bounds I wanted. I've been using it for years. Your question prompted me to look at it again and I just revised the code. Save this as an application ...


try
tell application "System Events" to set applname to (name of (some process whose frontmost is true)) as text
-- display dialog applname -- diagnostic only
if applname = "Finder" then return
tell application applname to set bounds of window 1 to {0, 22, 1200, 1000} -- for 1680 x 1050 monitor
on error
tell application "Finder" to beep
end try




To get rid of the Firefox "oddity", you may edit your first instruction this way:

tell application "System Events" to set applname to (title of (some process whose frontmost is true)) as text

for most of the apps, it would return the same string but for Firefox it will return "Firefox" in lieu of "Firefox-bin".

Yvan KOENIG (from FRANCE mercredi 7 mai 2008 20:41:58) _______________________________________________
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: How to maximize Safari windows?
      • From: Luther Fuller <email@hidden>
References: 
 >How to maximize Safari windows? (From: Jim Krenz <email@hidden>)
 >Re: How to maximize Safari windows? (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: How to maximize Safari windows?
  • Next by Date: Re: How to maximize Safari windows?
  • Previous by thread: Re: How to maximize Safari windows?
  • Next by thread: Re: How to maximize Safari windows?
  • Index(es):
    • Date
    • Thread