Re: How to maximize Safari windows?
Re: How to maximize Safari windows?
- Subject: Re: How to maximize Safari windows?
- From: Luther Fuller <email@hidden>
- Date: Wed, 7 May 2008 13:58:02 -0500
On May 7, 2008, at 1:42 PM, KOENIG Yvan wrote:
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".
Tried it. It had unforeseen consequences that required me to recompile
the application.
If Firefox is frontmost, then the line 'tell application applname ...'
asks "Where is the application ..."; so I choose Firefox; Now running
the application simply launches Firefox. Very undesirable!
_______________________________________________
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