• 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: Luther Fuller <email@hidden>
  • Date: Wed, 7 May 2008 13:31:14 -0500

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

It works with: Mail; Safari; NetNewsWire; TextEdit; Address Book; iCab; ...
But not Firefox; Activity Monitor; ...
The name of Firefox = "firefox-bin". (???) Some applications use 'document' instead of 'window'. You might want to put some more options in the try block to improve performance.

 _______________________________________________
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: KOENIG Yvan <email@hidden>
References: 
 >How to maximize Safari windows? (From: Jim Krenz <email@hidden>)

  • Prev by Date: Re: Adding a SENDER to a Group RULE in Apple Mail 2.1
  • 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